[llvm-bugs] [Bug 44026] New: [LoopVectorizer] bad vectorized loop: "Instruction does not dominate all uses!"

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Nov 16 23:57:45 PST 2019


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

            Bug ID: 44026
           Summary: [LoopVectorizer]   bad vectorized loop: "Instruction
                    does not dominate all uses!"
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Loop Optimizer
          Assignee: unassignedbugs at nondot.org
          Reporter: paulsson at linux.vnet.ibm.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 22819
  --> https://bugs.llvm.org/attachment.cgi?id=22819&action=edit
reduced testcase

clang -cc1 -triple s390x-ibm-linux -S -target-cpu z13 -O3 -w -vectorize-loops
-mllvm -force-target-instruction-cost=1 -mllvm -unroll-full-max-count=1
-faddrsig -x ir tc_insdoesnotdom.ll

Instruction does not dominate all uses!
  %27 = phi <4 x i32> [ %21, %pred.load.continue10 ], [ %26, %pred.load.if11 ]
  %0 = shufflevector <4 x i32> %vector.recur, <4 x i32> %27, <4 x i32> <i32 3,
i32 4, i32 5, i32 6>
in function func_21
fatal error: error in backend: Broken function found, compilation aborted!


Loop vectorizer seems to build a loop where the use comes before the definition
(%29):

vector.body:
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %pred.store.continue18 ]
  %vector.recur = phi <4 x i32> [ %vector.recur.init, %vector.ph ], [ %29,
%pred.store.continue18 ]
  %0 = shufflevector <4 x i32> %vector.recur, <4 x i32> %29, <4 x i32> <i32 3,
i32 4, i32 5, i32 6>

...
pred.load.continue12:
  %29 = phi <4 x i32> [ %23, %pred.load.continue10 ], [ %28, %pred.load.if11 ]

...
pred.store.continue18:
  %index.next = add i64 %index, 4
  %43 = icmp eq i64 %index.next, 8
  br i1 %43, label %middle.block, label %vector.body, !llvm.loop !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/20191117/0b5d4377/attachment.html>


More information about the llvm-bugs mailing list