[llvm-bugs] [Bug 32790] New: [AVX] partly-implemented 256-bit ISA leads to codegen problems
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Apr 25 08:21:11 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=32790
Bug ID: 32790
Summary: [AVX] partly-implemented 256-bit ISA leads to codegen
problems
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Backend: X86
Assignee: unassignedbugs at nondot.org
Reporter: spatel+llvm at rotateright.com
CC: llvm-bugs at lists.llvm.org
define <8 x i32> @legality_problems(<8 x i32> %a, <8 x i32> %b, <8 x i32> %c,
<8 x i32> %d) {
%add = add <8 x i32> %a, %b
%and = and <8 x i32> %add, %c
%sub = sub <8 x i32> %and, %d
ret <8 x i32> %sub
}
We'd be better off sticking to 128-bit ops here:
$ ./llc -o - v256.ll -mattr=avx
vextractf128 $1, %ymm1, %xmm4
vextractf128 $1, %ymm0, %xmm5
vpaddd %xmm4, %xmm5, %xmm4
vpaddd %xmm1, %xmm0, %xmm0
vinsertf128 $1, %xmm4, %ymm0, %ymm0
vandps %ymm2, %ymm0, %ymm0
vextractf128 $1, %ymm0, %xmm1
vextractf128 $1, %ymm3, %xmm2
vpsubd %xmm2, %xmm1, %xmm1
vpsubd %xmm3, %xmm0, %xmm0
vinsertf128 $1, %xmm1, %ymm0, %ymm0
retq
--
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/20170425/6c693bcc/attachment.html>
More information about the llvm-bugs
mailing list