Test source: git
Source: <stdin> ---------------------------------------- define i32 @foo(i32 %i) { %entry: assume i1 1 assume i1 1 %cond = icmp ne i32 %i, 0 br i1 %cond, label %then, label %else %else: %call.2 = call i32 @bar() assume i1 1 br label %exit %then: %call.1 = call i32 @bar() assume i1 1 br label %exit %exit: %k.0 = phi i32 [ %call.1, %then ], [ %call.2, %else ] ret i32 %k.0 } => define i32 @foo(i32 %i) { %entry: assume i1 1 assume i1 1 %cond = icmp ne i32 %i, 0 br i1 %cond, label %then, label %else %else: %call.2 = call i32 @bar() assume i1 1 br label %exit %then: %call.1 = call i32 @bar() assume i1 1 br label %exit %exit: %k.0 = phi i32 [ %call.1, %then ], [ %call.2, %else ] ret i32 %k.0 } Transformation seems to be correct! (syntactically equal) ---------------------------------------- define i1 @hoist_with_debug2(i32 %x) { %entry: %tobool.not = icmp ugt i32 %x, 2 br i1 %tobool.not, label %cond.end.thread, label %cond.end.thread19 %cond.end.thread19: assume i1 1 br label %exit %cond.end.thread: assume i1 1 br label %exit %exit: %p = phi i1 [ 1, %cond.end.thread19 ], [ 0, %cond.end.thread ] ret i1 %p } => define i1 @hoist_with_debug2(i32 %x) { %entry: %tobool.not = icmp ugt i32 %x, 2 assume i1 1 assume i1 1 %. = select i1 %tobool.not, i1 0, i1 1 ret i1 %. } Transformation seems to be correct! ---------------------------------------- define i16 @hoist_with_debug3_pr49982(i32 %x, i1 %c.2) { %entry: br label %for.cond %for.cond: %c.0 = icmp sgt i32 %x, 0 br i1 %c.0, label %check, label %latch %check: %c.1 = icmp ugt i32 %x, 2 br i1 %c.1, label %then, label %else %then: assume i1 1 br label %exit.2 %else: assume i1 1 br label %exit.2 %exit.2: ret i16 0 %latch: br i1 %c.2, label %exit.1, label %for.cond %exit.1: ret i16 20 } => define i16 @hoist_with_debug3_pr49982(i32 %x, i1 %c.2) { %entry: br label %for.cond %for.cond: %c.0 = icmp sgt i32 %x, 0 %brmerge = or i1 %c.0, %c.2 %.mux = select i1 %c.0, i16 0, i16 20 br i1 %brmerge, label %exit.1, label %for.cond %exit.1: ret i16 %.mux } Transformation doesn't verify! ERROR: Source is more defined than target Example: i32 %x = #x00000020 (32) i1 %c.2 = poison Source: i1 %c.0 = #x1 (1) i1 %c.1 = #x1 (1) Target: i1 %c.0 = #x1 (1) i1 %brmerge = poison i16 %.mux = #x0000 (0) ------------------- SMT STATS ------------------- Num queries: 3 Num invalid: 0 Num skips: 0 Num trivial: 11 (78.6%) Num timeout: 0 (0.0%) Num errors: 0 (0.0%) Num SAT: 3 (100.0%) Num UNSAT: 0 (0.0%) Alive2: Transform doesn't verify; aborting!
+ : 'RUN: at line 2' + /home/nlopes/alive2/build/opt-alive.sh -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S + /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/SimplifyCFG/hoist-dbgvalue.ll FileCheck error: '<stdin>' is empty. FileCheck command line: /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/SimplifyCFG/hoist-dbgvalue.ll