[llvm-bugs] [Bug 37726] New: InstCombine: redundant llvm.assume emitted when debug info is present

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Jun 7 00:10:06 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=37726

            Bug ID: 37726
           Summary: InstCombine: redundant llvm.assume emitted when debug
                    info is present
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: vsk at apple.com
                CC: llvm-bugs at lists.llvm.org

Running `opt -instcombine` on test/Transforms/InstCombine/assume.ll produces
different output with/without debug info present. To reproduce the issue, do:

# Baseline
$ $OPT -instcombine test/Transforms/InstCombine/assume.ll -S -o -

# With debug info
$ $OPT -O1 test/Transforms/InstCombine/assume.ll -o - -debugify-each
-debugify-quiet | $OPT -strip -S

With debug info present, the last function in the file has what looks like a
redundant llvm.assume call:

define i32 @assumption_conflicts_with_known_bits(i32, i32) {
  tail call void @llvm.assume(i1 false)
  tail call void @llvm.assume(i1 false)
  ret i32 0                                                                    
                                                                               
                  }

Without debug info, the function looks like this:

define i32 @assumption_conflicts_with_known_bits(i32, i32) {
  tail call void @llvm.assume(i1 false)
  ret i32 0                                                                    
                                                                               
                  }

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180607/11044962/attachment-0001.html>


More information about the llvm-bugs mailing list