[llvm-bugs] [Bug 37248] New: LoopVectorizer triggers "Instruction does not dominate all uses!" after r326079
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Apr 25 22:32:55 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=37248
Bug ID: 37248
Summary: LoopVectorizer triggers "Instruction does not dominate
all uses!" after r326079
Product: new-bugs
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: mikael.holmen at ericsson.com
CC: llvm-bugs at lists.llvm.org
Created attachment 20226
--> https://bugs.llvm.org/attachment.cgi?id=20226&action=edit
reproducer
Running
opt -loop-vectorize -S -o - tr15930.ll
with this commit gives:
Instruction does not dominate all uses!
%25 = trunc i32 %offset.idx16 to i16
%broadcast.splatinsert17 = insertelement <4 x i16> undef, i16 %25, i32 0
LLVM ERROR: Broken function found, compilation aborted!
Looking at the output after the loop vectorizer we get
*** IR Dump After Loop Vectorization ***
define void @f1() {
entry:
br i1 false, label %scalar.ph, label %vector.scevcheck
vector.scevcheck: ; preds = %entry
%mul = call { i16, i1 } @llvm.umul.with.overflow.i16(i16 1, i16 undef)
%mul.result = extractvalue { i16, i1 } %mul, 0
%mul.overflow = extractvalue { i16, i1 } %mul, 1
%0 = add i16 undef, %mul.result
%1 = sub i16 undef, %mul.result
%2 = icmp sgt i16 %1, undef
%3 = icmp slt i16 %0, undef
%4 = select i1 true, i1 %2, i1 %3
%5 = or i1 %4, %mul.overflow
%6 = or i1 false, %5
br i1 %6, label %scalar.ph, label %vector.ph
vector.ph: ; preds = %vector.scevcheck
%broadcast.splatinsert17 = insertelement <4 x i16> undef, i16 %25, i32 0
%broadcast.splat18 = shufflevector <4 x i16> %broadcast.splatinsert17, <4 x
i16> undef, <4 x i32> zeroinitializer
br label %vector.body
[...]
pred.load.continue15: ; preds = %pred.load.if14,
%pred.load.continue13
%24 = phi i32 [ undef, %pred.load.continue13 ], [ %23, %pred.load.if14 ]
%offset.idx16 = sub i32 undef, %index
%25 = trunc i32 %offset.idx16 to i16
If we follow the path
entry -> vector.scevcheck -> vector.ph
we see that the def of %25 in pred.load.continue15 doesn't dominate the use in
vector.ph.
--
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/20180426/d1a208ab/attachment-0001.html>
More information about the llvm-bugs
mailing list