Test source: git
Source: <stdin> ---------------------------------------- define * @simplify_phi_common_value_op0(* %ptr, * %b) { %entry: %isnull = icmp eq * %ptr, null br i1 %isnull, label %return, label %else %else: %lb = load i32, * %b, align 4 %add = add nsw i32 %lb, 1 store i32 %add, * %b, align 4 br label %return %return: %r = phi * [ %ptr, %else ], [ null, %entry ] ret * %r } => define * @simplify_phi_common_value_op0(* %ptr, * %b) { %entry: %isnull = icmp eq * %ptr, null br i1 %isnull, label %return, label %else %else: %lb = load i32, * %b, align 4 %add = add nsw i32 %lb, 1 store i32 %add, * %b, align 4 br label %return %return: ret * %ptr } Transformation doesn't verify! ERROR: Value mismatch Example: * %ptr = pointer(non-local, block_id=1, offset=-3) * %b = poison Source: i1 %isnull = #x1 (1) i32 %lb = poison i32 %add = poison * %r = null SOURCE MEMORY STATE =================== NON-LOCAL BLOCKS: Block 0 > size: 0 align: 4 alloc type: 0 address: 0 Block 1 > size: 5 align: 2 alloc type: 0 address: 3 Block 2 > size: 0 align: 2 alloc type: 0 address: 8 Target: i1 %isnull = #x1 (1) i32 %lb = poison i32 %add = poison Source value: null Target value: pointer(non-local, block_id=1, offset=-3) ------------------- SMT STATS ------------------- Num queries: 9 Num invalid: 0 Num skips: 0 Num trivial: 8 (47.1%) Num timeout: 0 (0.0%) Num errors: 0 (0.0%) Num SAT: 7 (77.8%) Num UNSAT: 2 (22.2%) Alive2: Transform doesn't verify; aborting!
+ : 'RUN: at line 2' + /home/nlopes/alive2/build/opt-alive.sh -correlated-propagation -S + /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/CorrelatedValuePropagation/phi-common-val.ll FileCheck error: '<stdin>' is empty. FileCheck command line: /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/CorrelatedValuePropagation/phi-common-val.ll