File: insertelement-duplicates.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 (58 lines) | stat: -rw-r--r-- 2,619 bytes parent folder | download | duplicates (13)
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=+sse2 | FileCheck %s --check-prefix=SSE-32
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+sse2 | FileCheck %s --check-prefix=SSE-64
; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=+avx | FileCheck %s --check-prefix=AVX-32
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx | FileCheck %s --check-prefix=AVX-64

define void @PR15298(ptr nocapture %source, ptr nocapture %dest) nounwind noinline {
; SSE-32-LABEL: PR15298:
; SSE-32:       # %bb.0: # %L.entry
; SSE-32-NEXT:    movl {{[0-9]+}}(%esp), %eax
; SSE-32-NEXT:    movl {{[0-9]+}}(%esp), %ecx
; SSE-32-NEXT:    xorps %xmm0, %xmm0
; SSE-32-NEXT:    xorps %xmm1, %xmm1
; SSE-32-NEXT:    shufps {{.*#+}} xmm1 = xmm1[0,3],mem[0,0]
; SSE-32-NEXT:    shufps {{.*#+}} xmm1 = xmm1[0,2,3,1]
; SSE-32-NEXT:    movups %xmm0, 624(%eax)
; SSE-32-NEXT:    movups %xmm1, 608(%eax)
; SSE-32-NEXT:    retl
;
; SSE-64-LABEL: PR15298:
; SSE-64:       # %bb.0: # %L.entry
; SSE-64-NEXT:    xorps %xmm0, %xmm0
; SSE-64-NEXT:    xorps %xmm1, %xmm1
; SSE-64-NEXT:    shufps {{.*#+}} xmm1 = xmm1[0,3],mem[0,0]
; SSE-64-NEXT:    shufps {{.*#+}} xmm1 = xmm1[0,2,3,1]
; SSE-64-NEXT:    movups %xmm0, 624(%rsi)
; SSE-64-NEXT:    movups %xmm1, 608(%rsi)
; SSE-64-NEXT:    retq
;
; AVX-32-LABEL: PR15298:
; AVX-32:       # %bb.0: # %L.entry
; AVX-32-NEXT:    movl {{[0-9]+}}(%esp), %eax
; AVX-32-NEXT:    movl {{[0-9]+}}(%esp), %ecx
; AVX-32-NEXT:    vbroadcastss 304(%ecx), %xmm0
; AVX-32-NEXT:    vxorps %xmm1, %xmm1, %xmm1
; AVX-32-NEXT:    vblendps {{.*#+}} ymm0 = ymm1[0],ymm0[1,2],ymm1[3,4,5,6,7]
; AVX-32-NEXT:    vmovups %ymm0, 608(%eax)
; AVX-32-NEXT:    vzeroupper
; AVX-32-NEXT:    retl
;
; AVX-64-LABEL: PR15298:
; AVX-64:       # %bb.0: # %L.entry
; AVX-64-NEXT:    vbroadcastss 304(%rdi), %xmm0
; AVX-64-NEXT:    vxorps %xmm1, %xmm1, %xmm1
; AVX-64-NEXT:    vblendps {{.*#+}} ymm0 = ymm1[0],ymm0[1,2],ymm1[3,4,5,6,7]
; AVX-64-NEXT:    vmovups %ymm0, 608(%rsi)
; AVX-64-NEXT:    vzeroupper
; AVX-64-NEXT:    retq
L.entry:
  %0 = getelementptr inbounds <4 x float>, ptr %source, i32 19
  %1 = load <4 x float>, ptr %0, align 16
  %2 = extractelement <4 x float> %1, i32 0
  %3 = insertelement <8 x float> <float 0.000000e+00, float undef, float undef, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00>, float %2, i32 2
  %4 = insertelement <8 x float> %3, float %2, i32 1
  %5 = getelementptr <8 x float>, ptr %dest, i32 19
  store <8 x float> %4, ptr %5, align 4
  ret void
}