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: unassignedb...@nondot.org
          Reporter: spatel+l...@rotateright.com
                CC: llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to