[llvm-bugs] [Bug 39178] New: [X86] SimplifyDemandedBits failure to simplify PMULDQ/PMULUDQ
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Oct 4 09:58:44 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=39178
Bug ID: 39178
Summary: [X86] SimplifyDemandedBits failure to simplify
PMULDQ/PMULUDQ
Product: libraries
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: Backend: X86
Assignee: unassignedbugs at nondot.org
Reporter: llvm-dev at redking.me.uk
CC: andrea.dibiagio at gmail.com, craig.topper at gmail.com,
llvm-bugs at lists.llvm.org, spatel+llvm at rotateright.com
define <2 x i64> @muludq_demanded_bits(<4 x i32>, <4 x i32>) {
%3 = shufflevector <4 x i32> %0, <4 x i32> <i32 undef, i32 0, i32 undef, i32
0>, <4 x i32> <i32 0, i32 5, i32 2, i32 7>
%4 = shufflevector <4 x i32> %1, <4 x i32> <i32 undef, i32 0, i32 undef, i32
0>, <4 x i32> <i32 0, i32 5, i32 2, i32 7>
%5 = bitcast <4 x i32> %3 to <2 x i64>
%6 = bitcast <4 x i32> %4 to <2 x i64>
%7 = mul <2 x i64> %6, %5
ret <2 x i64> %7
}
llc -mcpu=btver2
vpxor %xmm2, %xmm2, %xmm2
vpblendw $204, %xmm2, %xmm0, %xmm0 # xmm0 =
xmm0[0,1],xmm2[2,3],xmm0[4,5],xmm2[6,7]
vpblendw $204, %xmm2, %xmm1, %xmm1 # xmm1 =
xmm1[0,1],xmm2[2,3],xmm1[4,5],xmm2[6,7]
vpmuludq %xmm0, %xmm1, %xmm0
retq
The vpblendw can be removed as PMULDQ/PMULUDQ only use the bottom 32-bits of
each i64 element
--
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/20181004/ae0e1b10/attachment.html>
More information about the llvm-bugs
mailing list