File: 2012-01-12-extract-sv.ll

package info (click to toggle)
llvm-toolchain-17 1%3A17.0.6-22
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,799,624 kB
  • sloc: cpp: 6,428,607; ansic: 1,383,196; asm: 793,408; python: 223,504; objc: 75,364; f90: 60,502; lisp: 33,869; pascal: 15,282; sh: 9,684; perl: 7,453; ml: 4,937; awk: 3,523; makefile: 2,889; javascript: 2,149; xml: 888; fortran: 619; cs: 573
file content (38 lines) | stat: -rw-r--r-- 1,981 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -mattr=+avx -mtriple=i686-pc-win32 | FileCheck %s --check-prefixes=AVX1
; RUN: llc < %s -mattr=+avx2 -mtriple=i686-pc-win32 | FileCheck %s --check-prefixes=AVX2

define void @endless_loop() {
; AVX1-LABEL: endless_loop:
; AVX1:       # %bb.0: # %entry
; AVX1-NEXT:    vmovaps (%eax), %xmm0
; AVX1-NEXT:    vshufps {{.*#+}} xmm1 = xmm0[0,0,0,0]
; AVX1-NEXT:    vinsertf128 $1, %xmm1, %ymm0, %ymm1
; AVX1-NEXT:    vxorps %xmm2, %xmm2, %xmm2
; AVX1-NEXT:    vblendps {{.*#+}} ymm1 = ymm2[0,1,2,3,4,5,6],ymm1[7]
; AVX1-NEXT:    vxorps %xmm2, %xmm2, %xmm2
; AVX1-NEXT:    vblendps {{.*#+}} xmm0 = xmm0[0],xmm2[1,2,3]
; AVX1-NEXT:    vmovaps %ymm0, (%eax)
; AVX1-NEXT:    vmovaps %ymm1, (%eax)
; AVX1-NEXT:    vzeroupper
; AVX1-NEXT:    retl
;
; AVX2-LABEL: endless_loop:
; AVX2:       # %bb.0: # %entry
; AVX2-NEXT:    vbroadcastss (%eax), %xmm0
; AVX2-NEXT:    vxorps %xmm1, %xmm1, %xmm1
; AVX2-NEXT:    vblendps {{.*#+}} xmm1 = xmm0[0],xmm1[1,2,3]
; AVX2-NEXT:    vbroadcastss %xmm0, %ymm0
; AVX2-NEXT:    vxorps %xmm2, %xmm2, %xmm2
; AVX2-NEXT:    vblendps {{.*#+}} ymm0 = ymm2[0,1,2,3,4,5,6],ymm0[7]
; AVX2-NEXT:    vmovaps %ymm0, (%eax)
; AVX2-NEXT:    vmovaps %ymm1, (%eax)
; AVX2-NEXT:    vzeroupper
; AVX2-NEXT:    retl
entry:
  %0 = load <8 x i32>, ptr addrspace(1) undef, align 32
  %1 = shufflevector <8 x i32> %0, <8 x i32> undef, <16 x i32> <i32 4, i32 4, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
  %2 = shufflevector <16 x i32> <i32 undef, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 undef>, <16 x i32> %1, <16 x i32> <i32 16, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 17>
  store <16 x i32> %2, ptr addrspace(1) undef, align 64
  ret void
}