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

            Bug ID: 44020
           Summary: [LoopVectorizer]   bad vectorized loop: "Instruction
                    does not dominate all uses!"
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Loop Optimizer
          Assignee: unassignedb...@nondot.org
          Reporter: pauls...@linux.vnet.ibm.com
                CC: llvm-bugs@lists.llvm.org, llvm-...@redking.me.uk
                CC: llvm-...@redking.me.uk

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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to