Test source: git
Source: <stdin> ERROR: Unsupported instruction: %__constexpr_0 = bitcast i1 (i8*)* @ule_null_constexpr to i8 (...)* ERROR: Unsupported instruction: %cmp = icmp ule i8 (...)* null, bitcast (i1 (i8*)* @ule_null_constexpr to i8 (...)*) ERROR: Unsupported instruction: %__constexpr_0 = bitcast i1 (i8*)* @ugt_null_constexpr to i8 (...)* ERROR: Unsupported instruction: %cmp = icmp ugt i8 (...)* null, bitcast (i1 (i8*)* @ugt_null_constexpr to i8 (...)*) ERROR: Unsupported instruction: %__constexpr_0 = bitcast i1 (i8*)* @ugt_null_constexpr to i8 (...)* ERROR: Unsupported instruction: %cmp = icmp uge i8 (...)* bitcast (i1 (i8*)* @ugt_null_constexpr to i8 (...)*), null ERROR: Unsupported instruction: %__constexpr_0 = bitcast i1 (i8*)* @ugt_null_constexpr to i8 (...)* ERROR: Unsupported instruction: %cmp = icmp ult i8 (...)* bitcast (i1 (i8*)* @ugt_null_constexpr to i8 (...)*), null ERROR: Unsupported instruction: %__constexpr_0 = bitcast i1 (i8*)* @ugt_null_constexpr to i8 (...)* ERROR: Unsupported instruction: %cmp = icmp ule i8 (...)* bitcast (i1 (i8*)* @ugt_null_constexpr to i8 (...)*), null ERROR: Unsupported instruction: %__constexpr_0 = bitcast i1 (i8*)* @ugt_null_constexpr to i8 (...)* ERROR: Unsupported instruction: %cmp = icmp slt i8 (...)* bitcast (i1 (i8*)* @ugt_null_constexpr to i8 (...)*), null ERROR: Unsupported instruction: %__constexpr_0 = bitcast i1 (i8*)* @ugt_null_constexpr to i8 (...)* ERROR: Unsupported instruction: %cmp = icmp ult i8 (...)* bitcast (i1 (i8*)* @ugt_null_constexpr to i8 (...)*), inttoptr (i32 1 to i8 (...)*) ERROR: Unsupported instruction: %__constexpr_1 = bitcast i1 (i8*)* @ugt_null_constexpr to i8 (...)* ERROR: Unsupported instruction: %__constexpr_0 = icmp slt i8 (...)* bitcast (i1 (i8*)* @ugt_null_constexpr to i8 (...)*), null ERROR: Unsupported instruction: ret i1 icmp slt (i8 (...)* bitcast (i1 (i8*)* @ugt_null_constexpr to i8 (...)*), i8 (...)* null) ERROR: Unsupported instruction: %__constexpr_1 = bitcast i1 (i8*)* @ugt_null_constexpr to i8 (...)* ERROR: Unsupported instruction: %__constexpr_0 = icmp ult i8 (...)* bitcast (i1 (i8*)* @ugt_null_constexpr to i8 (...)*), inttoptr (i32 1 to i8 (...)*) ERROR: Unsupported instruction: ret i1 icmp ult (i8 (...)* bitcast (i1 (i8*)* @ugt_null_constexpr to i8 (...)*), i8 (...)* inttoptr (i32 1 to i8 (...)*)) ---------------------------------------- @g = global 8 bytes, align 4 define i1 @global_ne_null() { %0: %cmp = icmp ne * @g, null ret i1 %cmp } => @g = global 8 bytes, align 4 define i1 @global_ne_null() { %0: ret i1 1 } Transformation seems to be correct! ---------------------------------------- @g = global 8 bytes, align 4 define i1 @global_ugt_null() { %0: %cmp = icmp ugt * @g, null ret i1 %cmp } => @g = global 8 bytes, align 4 define i1 @global_ugt_null() { %0: ret i1 1 } Transformation seems to be correct! ---------------------------------------- @g = global 8 bytes, align 4 define i1 @global_sgt_null() { %0: %cmp = icmp sgt * @g, null ret i1 %cmp } => @g = global 8 bytes, align 4 define i1 @global_sgt_null() { %0: %__constexpr_0 = icmp sgt * @g, null ret i1 %__constexpr_0 } Transformation seems to be correct! ---------------------------------------- @g = global 8 bytes, align 4 define i1 @global_gep_ne_null() { %0: %gep = gep inbounds * @g, 8 x i64 1 %cmp = icmp ne * %gep, null, use_provenance ret i1 %cmp } => @g = global 8 bytes, align 4 define i1 @global_gep_ne_null() { %0: ret i1 1 } Transformation seems to be correct! ---------------------------------------- @g = global 8 bytes, align 4 define i1 @global_gep_ugt_null() { %0: %gep = gep inbounds * @g, 8 x i64 1 %cmp = icmp ugt * %gep, null ret i1 %cmp } => @g = global 8 bytes, align 4 define i1 @global_gep_ugt_null() { %0: ret i1 1 } Transformation seems to be correct! ---------------------------------------- @g = global 8 bytes, align 4 define i1 @global_gep_sgt_null() { %0: %gep = gep inbounds * @g, 8 x i64 1 %cmp = icmp sgt * %gep, null ret i1 %cmp } => @g = global 8 bytes, align 4 define i1 @global_gep_sgt_null() { %0: %__constexpr_1 = gep inbounds * @g, 8 x i64 1 %__constexpr_0 = icmp sgt * %__constexpr_1, null ret i1 %__constexpr_0 } Transformation seems to be correct! ---------------------------------------- @g2 = global 4 bytes, align 4 define i1 @null_gep_ne_null() { %0: %__constexpr_0 = ptrtoint * @g2 to i64 %gep = gep * null, 1 x i64 %__constexpr_0 %cmp = icmp ne * %gep, null, use_provenance ret i1 %cmp } => @g2 = global 4 bytes, align 4 define i1 @null_gep_ne_null() { %0: ret i1 1 } Transformation seems to be correct! ---------------------------------------- @g2 = global 4 bytes, align 4 define i1 @null_gep_ugt_null() { %0: %__constexpr_0 = ptrtoint * @g2 to i64 %gep = gep * null, 1 x i64 %__constexpr_0 %cmp = icmp ugt * %gep, null ret i1 %cmp } => @g2 = global 4 bytes, align 4 define i1 @null_gep_ugt_null() { %0: ret i1 1 } Transformation seems to be correct! ---------------------------------------- @g2 = global 4 bytes, align 4 define i1 @null_gep_sgt_null() { %0: %__constexpr_0 = ptrtoint * @g2 to i64 %gep = gep * null, 1 x i64 %__constexpr_0 %cmp = icmp sgt * %gep, null ret i1 %cmp } => @g2 = global 4 bytes, align 4 define i1 @null_gep_sgt_null() { %0: %__constexpr_2 = ptrtoint * @g2 to i64 %__constexpr_1 = gep * null, 1 x i64 %__constexpr_2 %__constexpr_0 = icmp sgt * %__constexpr_1, null ret i1 %__constexpr_0 } Transformation seems to be correct! ---------------------------------------- @g2 = global 4 bytes, align 4 @g = global 8 bytes, align 4 define i1 @null_gep_ne_global() { %0: %__constexpr_0 = ptrtoint * @g2 to i64 %gep = gep * null, 8 x i64 %__constexpr_0 %cmp = icmp ne * %gep, @g ret i1 %cmp } => @g2 = global 4 bytes, align 4 @g = global 8 bytes, align 4 define i1 @null_gep_ne_global() { %0: ret i1 1 } Transformation doesn't verify! ERROR: Value mismatch Example: Source: i64 %__constexpr_0 = #xfffffffffffffa00 (18446744073709550080, -1536) * %gep = pointer(non-local, block_id=0, offset=-12288) i1 %cmp = #x0 (0) SOURCE MEMORY STATE =================== NON-LOCAL BLOCKS: Block 0 > size: 0 align: 1 alloc type: 0 address: 0 Block 1 > size: 4 align: 4 alloc type: 0 address: 18446744073709550080 Block 2 > size: 8 align: 4 alloc type: 0 address: 18446744073709539328 Target: Source value: #x0 (0) Target value: #x1 (1) ------------------- SMT STATS ------------------- Num queries: 16 Num invalid: 0 Num skips: 0 Num trivial: 58 (78.4%) Num timeout: 0 (0.0%) Num errors: 0 (0.0%) Num SAT: 11 (68.8%) Num UNSAT: 5 (31.2%) Alive2: Transform doesn't verify; aborting!
+ : 'RUN: at line 2' + /home/nlopes/alive2/build/opt-alive.sh -instsimplify -S -verify + /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/InstSimplify/ConstProp/icmp-null.ll FileCheck error: '<stdin>' is empty. FileCheck command line: /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/InstSimplify/ConstProp/icmp-null.ll