Skip to content

InstCombine: test/Transforms/InstCombine/call-guard.ll looks different with debug info present #37062

@vedantk

Description

@vedantk
Bugzilla Link 37714
Resolution FIXED
Resolved on Nov 22, 2019 13:40
Version trunk
OS All
Blocks #37076
CC @arpilipe,@jmorse,@preames

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 ^

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