Skip to content

InstCombine: stacksaverestore.ll looks different with debug info present #37061

@vedantk

Description

@vedantk
Bugzilla Link 37713
Resolution FIXED
Resolved on Jun 08, 2018 13:42
Version trunk
OS All
Blocks #37076
CC @adrian-prantl,@gregbedwell,@JDevlieghere,@rnk

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 ^

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzilla

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions