Extended Description
Running opt -O1 on stacksaverestore.ll produces different output with/without debug info present. To reproduce the issue, do:
Baseline
$ $OPT -O1 test/Transforms/InstCombine/stacksaverestore.ll -S -o -
With debug info
$ $OPT -O1 test/Transforms/InstCombine/stacksaverestore.ll -o - -debugify-each -debugify-quiet | $OPT -strip -S
Comparing: -O1 test/Transforms/InstCombine/stacksaverestore.ll
Baseline: /var/folders/j8/t4w0bp8j6x1g6fpghkcb4sjm0000gp/T/tmp.P2vczKKB
With DI : /var/folders/j8/t4w0bp8j6x1g6fpghkcb4sjm0000gp/T/tmp.pcByPNQ1
12,16c12,18
< ; Function Attrs: norecurse nounwind readnone
< define noalias nonnull i32* @test1(i32) local_unnamed_addr #1 {
< %2 = zext i32 %0 to i64
< %3 = alloca i32, i64 %2, align 4
< ret i32* %3
; Function Attrs: nounwind
define noalias nonnull i32* @test1(i32) local_unnamed_addr #0 {
%2 = tail call i8* @llvm.stacksave()
tail call void @llvm.stackrestore(i8* %2)
%3 = zext i32 %0 to i64
%4 = alloca i32, i64 %3, align 4
ret i32* %4
:: Found a test case ^
Extended Description
Running
opt -O1on stacksaverestore.ll produces different output with/without debug info present. To reproduce the issue, do:Baseline
$ $OPT -O1 test/Transforms/InstCombine/stacksaverestore.ll -S -o -
With debug info
$ $OPT -O1 test/Transforms/InstCombine/stacksaverestore.ll -o - -debugify-each -debugify-quiet | $OPT -strip -S
Comparing: -O1 test/Transforms/InstCombine/stacksaverestore.ll
Baseline: /var/folders/j8/t4w0bp8j6x1g6fpghkcb4sjm0000gp/T/tmp.P2vczKKB
With DI : /var/folders/j8/t4w0bp8j6x1g6fpghkcb4sjm0000gp/T/tmp.pcByPNQ1
12,16c12,18
< ; Function Attrs: norecurse nounwind readnone
< define noalias nonnull i32* @test1(i32) local_unnamed_addr #1 {
< %2 = zext i32 %0 to i64
< %3 = alloca i32, i64 %2, align 4
< ret i32* %3