[llvm-bugs] [Bug 43620] New: llvm.assume blocks vectorizer predication
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Oct 9 07:17:45 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=43620
Bug ID: 43620
Summary: llvm.assume blocks vectorizer predication
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Loop Optimizer
Assignee: unassignedbugs at nondot.org
Reporter: benny.kra at gmail.com
CC: ayal.zaks at intel.com, hfinkel at anl.gov,
llvm-bugs at lists.llvm.org
$ cat t.cc
void foo(float *__restrict a, float *__restrict b, int n) {
for (int i = 0; i != n; ++i) {
float x = 1;
if (i < 495616) {
x = 23;
} else if (i < 991232) {
x = 42;
} else {
__builtin_unreachable();
}
b[i] = a[i] * x;
}
}
This only gets vectorized if I remove the __builtin_unreachable, but that
shouldn't affect vectorization at all. The unreachable gets converted into an
llvm.assume by SimplifyCFG but LV doesn't understand that it's not blocking
predication.
Godbolt: https://godbolt.org/z/PYp4wa
--
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/20191009/c02821c1/attachment.html>
More information about the llvm-bugs
mailing list