comparison test/CodeGen/X86/2011-05-09-loaduse.ll @ 147:c2174574ed3a

LLVM 10
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Wed, 14 Aug 2019 16:55:33 +0900
parents 803732b1fca8
children
comparison
equal deleted inserted replaced
134:3a76565eade5 147:c2174574ed3a
1 ; RUN: llc < %s -mtriple=i686-- -mcpu=corei7 | FileCheck %s 1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i686-- -mcpu=corei7 | FileCheck %s --check-prefixes=CHECK,X86
3 ; RUN: llc < %s -mtriple=x86_64-- -mcpu=corei7 | FileCheck %s --check-prefixes=CHECK,X64
2 4
3 ;CHECK-LABEL: test:
4 ;CHECK-NOT: pshufd
5 ;CHECK: ret
6 define float @test(<4 x float>* %A) nounwind { 5 define float @test(<4 x float>* %A) nounwind {
6 ; X86-LABEL: test:
7 ; X86: # %bb.0: # %entry
8 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
9 ; X86-NEXT: xorps %xmm0, %xmm0
10 ; X86-NEXT: flds 12(%eax)
11 ; X86-NEXT: movaps %xmm0, (%eax)
12 ; X86-NEXT: retl
13 ;
14 ; X64-LABEL: test:
15 ; X64: # %bb.0: # %entry
16 ; X64-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
17 ; X64-NEXT: xorps %xmm1, %xmm1
18 ; X64-NEXT: movaps %xmm1, (%rdi)
19 ; X64-NEXT: retq
7 entry: 20 entry:
8 %T = load <4 x float>, <4 x float>* %A 21 %T = load <4 x float>, <4 x float>* %A
9 %R = extractelement <4 x float> %T, i32 3 22 %R = extractelement <4 x float> %T, i32 3
10 store <4 x float><float 0.0, float 0.0, float 0.0, float 0.0>, <4 x float>* %A 23 store <4 x float><float 0.0, float 0.0, float 0.0, float 0.0>, <4 x float>* %A
11 ret float %R 24 ret float %R