[llvm-bugs] [Bug 30880] New: After Loop Distribution: "Instruction does not dominate all uses!"

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Nov 2 02:41:54 PDT 2016


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

            Bug ID: 30880
           Summary: After Loop Distribution: "Instruction does not
                    dominate all uses!"
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: mikael.holmen at ericsson.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 17537
  --> https://llvm.org/bugs/attachment.cgi?id=17537&action=edit
Reduced reproducer

With

 opt -S -loop-distribute red.ll

I get

Instruction does not dominate all uses!
  %_tmp46 = getelementptr [1 x i16], [1 x i16]* %_tmp40, i16 0, i64 2
  %bc1 = bitcast i16* %_tmp46 to i8*
Instruction does not dominate all uses!
  %_tmp46 = getelementptr [1 x i16], [1 x i16]* %_tmp40, i16 0, i64 2
  %bc3 = bitcast i16* %_tmp46 to i8*
LLVM ERROR: Broken function found, compilation aborted!

Looking at the two first bb:s after Loop Distribution I see

*** IR Dump After Loop Distribition ***
define void @bar() {
  %_tmp10 = call i16* @foo()
  %_tmp31 = bitcast i16* %_tmp10 to %rec29*
  %_tmp32 = getelementptr %rec29, %rec29* %_tmp31, i16 0, i32 4
  %_tmp33 = bitcast [4 x %rec28]* %_tmp32 to %rec31*
  %_tmp34 = getelementptr %rec31, %rec31* %_tmp33, i16 0, i32 2
  %_tmp36 = bitcast %rec29* %_tmp34 to %rec28*
  br label %bb1.lver.check

bb1.lver.check:                                   ; preds = %0
  %bc = bitcast i16* undef to i8*
  %bc1 = bitcast i16* %_tmp46 to i8*
[...]

so %_tmp46 is indeed used before its definition.

The was introduced in r264243

    [LAA] Support memchecks involving loop-invariant addresses

-- 
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/20161102/b690ee05/attachment.html>


More information about the llvm-bugs mailing list