|
8 | 8 | ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512vl,+avx512bw | FileCheck %s --check-prefixes=ALL,AVX,AVX512,AVX512BW |
9 | 9 | ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+xop,+avx | FileCheck %s --check-prefixes=ALL,XOP,XOPAVX1 |
10 | 10 | ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+xop,+avx2 | FileCheck %s --check-prefixes=ALL,XOP,XOPAVX2 |
| 11 | +; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+gfni | FileCheck %s --check-prefixes=ALL,GFNIPURE |
11 | 12 | ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+ssse3,+gfni | FileCheck %s --check-prefixes=ALL,GFNISSE |
12 | 13 | ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx,+gfni | FileCheck %s --check-prefixes=ALL,GFNIAVX,GFNIAVX1 |
13 | 14 | ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx2,+gfni | FileCheck %s --check-prefixes=ALL,GFNIAVX,GFNIAVX2 |
@@ -60,13 +61,13 @@ define i8 @test_bitreverse_i8(i8 %a) nounwind { |
60 | 61 | ; XOP-NEXT: # kill: def $al killed $al killed $eax |
61 | 62 | ; XOP-NEXT: retq |
62 | 63 | ; |
63 | | -; GFNISSE-LABEL: test_bitreverse_i8: |
64 | | -; GFNISSE: # %bb.0: |
65 | | -; GFNISSE-NEXT: movd %edi, %xmm0 |
66 | | -; GFNISSE-NEXT: gf2p8affineqb $0, {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0 |
67 | | -; GFNISSE-NEXT: movd %xmm0, %eax |
68 | | -; GFNISSE-NEXT: # kill: def $al killed $al killed $eax |
69 | | -; GFNISSE-NEXT: retq |
| 64 | +; GFNIPURE-LABEL: test_bitreverse_i8: |
| 65 | +; GFNIPURE: # %bb.0: |
| 66 | +; GFNIPURE-NEXT: movd %edi, %xmm0 |
| 67 | +; GFNIPURE-NEXT: gf2p8affineqb $0, {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0 |
| 68 | +; GFNIPURE-NEXT: movd %xmm0, %eax |
| 69 | +; GFNIPURE-NEXT: # kill: def $al killed $al killed $eax |
| 70 | +; GFNIPURE-NEXT: retq |
70 | 71 | ; |
71 | 72 | ; GFNIAVX-LABEL: test_bitreverse_i8: |
72 | 73 | ; GFNIAVX: # %bb.0: |
@@ -134,14 +135,14 @@ define i16 @test_bitreverse_i16(i16 %a) nounwind { |
134 | 135 | ; XOP-NEXT: # kill: def $ax killed $ax killed $eax |
135 | 136 | ; XOP-NEXT: retq |
136 | 137 | ; |
137 | | -; GFNISSE-LABEL: test_bitreverse_i16: |
138 | | -; GFNISSE: # %bb.0: |
139 | | -; GFNISSE-NEXT: movd %edi, %xmm0 |
140 | | -; GFNISSE-NEXT: gf2p8affineqb $0, {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0 |
141 | | -; GFNISSE-NEXT: movd %xmm0, %eax |
142 | | -; GFNISSE-NEXT: rolw $8, %ax |
143 | | -; GFNISSE-NEXT: # kill: def $ax killed $ax killed $eax |
144 | | -; GFNISSE-NEXT: retq |
| 138 | +; GFNIPURE-LABEL: test_bitreverse_i16: |
| 139 | +; GFNIPURE: # %bb.0: |
| 140 | +; GFNIPURE-NEXT: movd %edi, %xmm0 |
| 141 | +; GFNIPURE-NEXT: gf2p8affineqb $0, {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0 |
| 142 | +; GFNIPURE-NEXT: movd %xmm0, %eax |
| 143 | +; GFNIPURE-NEXT: rolw $8, %ax |
| 144 | +; GFNIPURE-NEXT: # kill: def $ax killed $ax killed $eax |
| 145 | +; GFNIPURE-NEXT: retq |
145 | 146 | ; |
146 | 147 | ; GFNIAVX-LABEL: test_bitreverse_i16: |
147 | 148 | ; GFNIAVX: # %bb.0: |
@@ -207,13 +208,13 @@ define i32 @test_bitreverse_i32(i32 %a) nounwind { |
207 | 208 | ; XOP-NEXT: vmovd %xmm0, %eax |
208 | 209 | ; XOP-NEXT: retq |
209 | 210 | ; |
210 | | -; GFNISSE-LABEL: test_bitreverse_i32: |
211 | | -; GFNISSE: # %bb.0: |
212 | | -; GFNISSE-NEXT: movd %edi, %xmm0 |
213 | | -; GFNISSE-NEXT: gf2p8affineqb $0, {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0 |
214 | | -; GFNISSE-NEXT: movd %xmm0, %eax |
215 | | -; GFNISSE-NEXT: bswapl %eax |
216 | | -; GFNISSE-NEXT: retq |
| 211 | +; GFNIPURE-LABEL: test_bitreverse_i32: |
| 212 | +; GFNIPURE: # %bb.0: |
| 213 | +; GFNIPURE-NEXT: movd %edi, %xmm0 |
| 214 | +; GFNIPURE-NEXT: gf2p8affineqb $0, {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0 |
| 215 | +; GFNIPURE-NEXT: movd %xmm0, %eax |
| 216 | +; GFNIPURE-NEXT: bswapl %eax |
| 217 | +; GFNIPURE-NEXT: retq |
217 | 218 | ; |
218 | 219 | ; GFNIAVX-LABEL: test_bitreverse_i32: |
219 | 220 | ; GFNIAVX: # %bb.0: |
@@ -282,13 +283,13 @@ define i64 @test_bitreverse_i64(i64 %a) nounwind { |
282 | 283 | ; XOP-NEXT: vmovq %xmm0, %rax |
283 | 284 | ; XOP-NEXT: retq |
284 | 285 | ; |
285 | | -; GFNISSE-LABEL: test_bitreverse_i64: |
286 | | -; GFNISSE: # %bb.0: |
287 | | -; GFNISSE-NEXT: movq %rdi, %xmm0 |
288 | | -; GFNISSE-NEXT: gf2p8affineqb $0, {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0 |
289 | | -; GFNISSE-NEXT: movq %xmm0, %rax |
290 | | -; GFNISSE-NEXT: bswapq %rax |
291 | | -; GFNISSE-NEXT: retq |
| 286 | +; GFNIPURE-LABEL: test_bitreverse_i64: |
| 287 | +; GFNIPURE: # %bb.0: |
| 288 | +; GFNIPURE-NEXT: movq %rdi, %xmm0 |
| 289 | +; GFNIPURE-NEXT: gf2p8affineqb $0, {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0 |
| 290 | +; GFNIPURE-NEXT: movq %xmm0, %rax |
| 291 | +; GFNIPURE-NEXT: bswapq %rax |
| 292 | +; GFNIPURE-NEXT: retq |
292 | 293 | ; |
293 | 294 | ; GFNIAVX-LABEL: test_bitreverse_i64: |
294 | 295 | ; GFNIAVX: # %bb.0: |
@@ -386,10 +387,10 @@ define <16 x i8> @test_bitreverse_v16i8(<16 x i8> %a) nounwind { |
386 | 387 | ; XOP-NEXT: vpperm {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0, %xmm0, %xmm0 |
387 | 388 | ; XOP-NEXT: retq |
388 | 389 | ; |
389 | | -; GFNISSE-LABEL: test_bitreverse_v16i8: |
390 | | -; GFNISSE: # %bb.0: |
391 | | -; GFNISSE-NEXT: gf2p8affineqb $0, {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0 |
392 | | -; GFNISSE-NEXT: retq |
| 390 | +; GFNIPURE-LABEL: test_bitreverse_v16i8: |
| 391 | +; GFNIPURE: # %bb.0: |
| 392 | +; GFNIPURE-NEXT: gf2p8affineqb $0, {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0 |
| 393 | +; GFNIPURE-NEXT: retq |
393 | 394 | ; |
394 | 395 | ; GFNIAVX-LABEL: test_bitreverse_v16i8: |
395 | 396 | ; GFNIAVX: # %bb.0: |
@@ -873,12 +874,12 @@ define <32 x i8> @test_bitreverse_v32i8(<32 x i8> %a) nounwind { |
873 | 874 | ; XOPAVX2-NEXT: vinserti128 $1, %xmm1, %ymm0, %ymm0 |
874 | 875 | ; XOPAVX2-NEXT: retq |
875 | 876 | ; |
876 | | -; GFNISSE-LABEL: test_bitreverse_v32i8: |
877 | | -; GFNISSE: # %bb.0: |
878 | | -; GFNISSE-NEXT: movdqa {{.*#+}} xmm2 = [1,2,4,8,16,32,64,128,1,2,4,8,16,32,64,128] |
879 | | -; GFNISSE-NEXT: gf2p8affineqb $0, %xmm2, %xmm0 |
880 | | -; GFNISSE-NEXT: gf2p8affineqb $0, %xmm2, %xmm1 |
881 | | -; GFNISSE-NEXT: retq |
| 877 | +; GFNIPURE-LABEL: test_bitreverse_v32i8: |
| 878 | +; GFNIPURE: # %bb.0: |
| 879 | +; GFNIPURE-NEXT: movdqa {{.*#+}} xmm2 = [1,2,4,8,16,32,64,128,1,2,4,8,16,32,64,128] |
| 880 | +; GFNIPURE-NEXT: gf2p8affineqb $0, %xmm2, %xmm0 |
| 881 | +; GFNIPURE-NEXT: gf2p8affineqb $0, %xmm2, %xmm1 |
| 882 | +; GFNIPURE-NEXT: retq |
882 | 883 | ; |
883 | 884 | ; GFNIAVX-LABEL: test_bitreverse_v32i8: |
884 | 885 | ; GFNIAVX: # %bb.0: |
@@ -1724,14 +1725,14 @@ define <64 x i8> @test_bitreverse_v64i8(<64 x i8> %a) nounwind { |
1724 | 1725 | ; XOPAVX2-NEXT: vinserti128 $1, %xmm2, %ymm1, %ymm1 |
1725 | 1726 | ; XOPAVX2-NEXT: retq |
1726 | 1727 | ; |
1727 | | -; GFNISSE-LABEL: test_bitreverse_v64i8: |
1728 | | -; GFNISSE: # %bb.0: |
1729 | | -; GFNISSE-NEXT: movdqa {{.*#+}} xmm4 = [1,2,4,8,16,32,64,128,1,2,4,8,16,32,64,128] |
1730 | | -; GFNISSE-NEXT: gf2p8affineqb $0, %xmm4, %xmm0 |
1731 | | -; GFNISSE-NEXT: gf2p8affineqb $0, %xmm4, %xmm1 |
1732 | | -; GFNISSE-NEXT: gf2p8affineqb $0, %xmm4, %xmm2 |
1733 | | -; GFNISSE-NEXT: gf2p8affineqb $0, %xmm4, %xmm3 |
1734 | | -; GFNISSE-NEXT: retq |
| 1728 | +; GFNIPURE-LABEL: test_bitreverse_v64i8: |
| 1729 | +; GFNIPURE: # %bb.0: |
| 1730 | +; GFNIPURE-NEXT: movdqa {{.*#+}} xmm4 = [1,2,4,8,16,32,64,128,1,2,4,8,16,32,64,128] |
| 1731 | +; GFNIPURE-NEXT: gf2p8affineqb $0, %xmm4, %xmm0 |
| 1732 | +; GFNIPURE-NEXT: gf2p8affineqb $0, %xmm4, %xmm1 |
| 1733 | +; GFNIPURE-NEXT: gf2p8affineqb $0, %xmm4, %xmm2 |
| 1734 | +; GFNIPURE-NEXT: gf2p8affineqb $0, %xmm4, %xmm3 |
| 1735 | +; GFNIPURE-NEXT: retq |
1735 | 1736 | ; |
1736 | 1737 | ; GFNIAVX1-LABEL: test_bitreverse_v64i8: |
1737 | 1738 | ; GFNIAVX1: # %bb.0: |
@@ -2849,6 +2850,11 @@ define <16 x i8> @fold_bitreverse_v16i8() nounwind { |
2849 | 2850 | ; XOP-NEXT: vmovaps {{.*#+}} xmm0 = [0,255,64,191,32,223,96,159,16,239,80,175,48,207,112,143] |
2850 | 2851 | ; XOP-NEXT: retq |
2851 | 2852 | ; |
| 2853 | +; GFNIPURE-LABEL: fold_bitreverse_v16i8: |
| 2854 | +; GFNIPURE: # %bb.0: |
| 2855 | +; GFNIPURE-NEXT: movaps {{.*#+}} xmm0 = [0,255,64,191,32,223,96,159,16,239,80,175,48,207,112,143] |
| 2856 | +; GFNIPURE-NEXT: retq |
| 2857 | +; |
2852 | 2858 | ; GFNISSE-LABEL: fold_bitreverse_v16i8: |
2853 | 2859 | ; GFNISSE: # %bb.0: |
2854 | 2860 | ; GFNISSE-NEXT: movaps {{.*#+}} xmm0 = [0,255,64,191,32,223,96,159,16,239,80,175,48,207,112,143] |
|
0 commit comments