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: unassignedb...@nondot.org
          Reporter: v...@apple.com
                CC: llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to