[llvm-bugs] [Bug 52351] New: [InstCombine] try harder to peek through vector bitcasts with bitwise logic
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Oct 29 09:08:20 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=52351
Bug ID: 52351
Summary: [InstCombine] try harder to peek through vector
bitcasts with bitwise logic
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Scalar Optimizations
Assignee: unassignedbugs at nondot.org
Reporter: spatel+llvm at rotateright.com
CC: llvm-bugs at lists.llvm.org
Vector bitcasts can interfere with bitwise logic reductions:
define <2 x i64> @src(<2 x i64> %x, <4 x i32> %y, <4 x i32> %z) {
%yb = bitcast <4 x i32> %y to <2 x i64>
%yz = and <4 x i32> %z, %y
%yzb = bitcast <4 x i32> %yz to <2 x i64>
%xy = and <2 x i64> %yb, %x
%r = or <2 x i64> %xy, %yzb
ret <2 x i64> %r
}
define <2 x i64> @tgt(<2 x i64> %x, <4 x i32> %y, <4 x i32> %z) {
%xb = bitcast <2 x i64> %x to <4 x i32>
%xz = or <4 x i32> %xb, %z
%xyz = and <4 x i32> %xz, %y
%r = bitcast <4 x i32> %xyz to <2 x i64>
ret <2 x i64> %r
}
https://alive2.llvm.org/ce/z/dWQbwD
--
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/20211029/2b6616b3/attachment.html>
More information about the llvm-bugs
mailing list