Extended Description
Running opt -O1 on call-guard.ll produces different output with/without debug info present. To reproduce the issue, do:
Baseline
$ $OPT -O1 test/Transforms/InstCombine/call-guard.ll -S -o -
With debug info
$ $OPT -O1 test/Transforms/InstCombine/call-guard.ll -o - -debugify-each -debugify-quiet | $OPT -strip -S
Comparing: -O1 test/Transforms/InstCombine/call-guard.ll
Baseline: /var/folders/j8/t4w0bp8j6x1g6fpghkcb4sjm0000gp/T/tmp.RGoONn6d
With DI : /var/folders/j8/t4w0bp8j6x1g6fpghkcb4sjm0000gp/T/tmp.9KJlc8DB
20a21
call void (i1, ...) @llvm.experimental.guard(i1 %4, i32 123) [ "deopt"() ]
23,24c24
< %7 = and i1 %6, %4
< call void (i1, ...) @llvm.experimental.guard(i1 %7, i32 123) [ "deopt"() ]
call void (i1, ...) @llvm.experimental.guard(i1 %6, i32 789) [ "deopt"() ]
38,39c38,40
< %3 = load i32, i32* %1, align 4
< %4 = and i32 %3, %0
%3 = icmp slt i32 %0, 0
call void (i1, ...) @llvm.experimental.guard(i1 %3, i32 123) [ "deopt"() ]
%4 = load i32, i32* %1, align 4
41c42
< call void (i1, ...) @llvm.experimental.guard(i1 %5, i32 123) [ "deopt"() ]
call void (i1, ...) @llvm.experimental.guard(i1 %5, i32 456) [ "deopt"() ]
:: Found a test case ^
Extended Description
Running
opt -O1on call-guard.ll produces different output with/without debug info present. To reproduce the issue, do:Baseline
$ $OPT -O1 test/Transforms/InstCombine/call-guard.ll -S -o -
With debug info
$ $OPT -O1 test/Transforms/InstCombine/call-guard.ll -o - -debugify-each -debugify-quiet | $OPT -strip -S
Comparing: -O1 test/Transforms/InstCombine/call-guard.ll
Baseline: /var/folders/j8/t4w0bp8j6x1g6fpghkcb4sjm0000gp/T/tmp.RGoONn6d
With DI : /var/folders/j8/t4w0bp8j6x1g6fpghkcb4sjm0000gp/T/tmp.9KJlc8DB
20a21