annotate test/CodeGen/X86/extractelement-legalization-store-ordering.ll @ 147:c2174574ed3a

LLVM 10
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Wed, 14 Aug 2019 16:55:33 +0900
parents 3a76565eade5
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
121
803732b1fca8 LLVM 5.0
kono
parents: 95
diff changeset
1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
803732b1fca8 LLVM 5.0
kono
parents: 95
diff changeset
2 ; RUN: llc < %s -mtriple=i386-apple-darwin -mcpu=yonah | FileCheck %s
95
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 target datalayout = "e-m:o-p:32:32-f64:32:64-f80:128-n8:16:32-S128"
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
5
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 ; Make sure we don't break load/store ordering when turning an extractelement
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 ; into loads, off the stack or a previous store.
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 ; Be very explicit about the ordering/stack offsets.
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
9
121
803732b1fca8 LLVM 5.0
kono
parents: 95
diff changeset
10 define void @test_extractelement_legalization_storereuse(<4 x i32> %a, i32* nocapture %x, i32* nocapture readonly %y, i32 %i) #0 {
95
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 ; CHECK-LABEL: test_extractelement_legalization_storereuse:
134
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
12 ; CHECK: ## %bb.0: ## %entry
121
803732b1fca8 LLVM 5.0
kono
parents: 95
diff changeset
13 ; CHECK-NEXT: pushl %ebx
803732b1fca8 LLVM 5.0
kono
parents: 95
diff changeset
14 ; CHECK-NEXT: pushl %edi
803732b1fca8 LLVM 5.0
kono
parents: 95
diff changeset
15 ; CHECK-NEXT: pushl %esi
803732b1fca8 LLVM 5.0
kono
parents: 95
diff changeset
16 ; CHECK-NEXT: movl {{[0-9]+}}(%esp), %eax
803732b1fca8 LLVM 5.0
kono
parents: 95
diff changeset
17 ; CHECK-NEXT: movl {{[0-9]+}}(%esp), %ecx
803732b1fca8 LLVM 5.0
kono
parents: 95
diff changeset
18 ; CHECK-NEXT: movl {{[0-9]+}}(%esp), %edx
147
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
19 ; CHECK-NEXT: paddd (%edx), %xmm0
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
20 ; CHECK-NEXT: movdqa %xmm0, (%edx)
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
21 ; CHECK-NEXT: movl (%edx), %esi
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
22 ; CHECK-NEXT: movl 4(%edx), %edi
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
23 ; CHECK-NEXT: shll $4, %ecx
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
24 ; CHECK-NEXT: movl 8(%edx), %ebx
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
25 ; CHECK-NEXT: movl 12(%edx), %edx
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
26 ; CHECK-NEXT: movl %esi, 12(%eax,%ecx)
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
27 ; CHECK-NEXT: movl %edi, (%eax,%ecx)
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
28 ; CHECK-NEXT: movl %ebx, 8(%eax,%ecx)
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
29 ; CHECK-NEXT: movl %edx, 4(%eax,%ecx)
121
803732b1fca8 LLVM 5.0
kono
parents: 95
diff changeset
30 ; CHECK-NEXT: popl %esi
803732b1fca8 LLVM 5.0
kono
parents: 95
diff changeset
31 ; CHECK-NEXT: popl %edi
803732b1fca8 LLVM 5.0
kono
parents: 95
diff changeset
32 ; CHECK-NEXT: popl %ebx
803732b1fca8 LLVM 5.0
kono
parents: 95
diff changeset
33 ; CHECK-NEXT: retl
95
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
34 entry:
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
35 %0 = bitcast i32* %y to <4 x i32>*
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
36 %1 = load <4 x i32>, <4 x i32>* %0, align 16
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
37 %am = add <4 x i32> %a, %1
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
38 store <4 x i32> %am, <4 x i32>* %0, align 16
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
39 %ip0 = shl nsw i32 %i, 2
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
40 %ip1 = or i32 %ip0, 1
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
41 %ip2 = or i32 %ip0, 2
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
42 %ip3 = or i32 %ip0, 3
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
43 %vecext = extractelement <4 x i32> %am, i32 %ip0
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
44 %arrayidx = getelementptr inbounds i32, i32* %x, i32 %ip3
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
45 store i32 %vecext, i32* %arrayidx, align 4
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
46 %vecext5 = extractelement <4 x i32> %am, i32 %ip1
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
47 %arrayidx8 = getelementptr inbounds i32, i32* %x, i32 %ip0
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
48 store i32 %vecext5, i32* %arrayidx8, align 4
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
49 %vecext11 = extractelement <4 x i32> %am, i32 %ip2
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
50 %arrayidx14 = getelementptr inbounds i32, i32* %x, i32 %ip2
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
51 store i32 %vecext11, i32* %arrayidx14, align 4
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
52 %vecext17 = extractelement <4 x i32> %am, i32 %ip3
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
53 %arrayidx20 = getelementptr inbounds i32, i32* %x, i32 %ip1
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
54 store i32 %vecext17, i32* %arrayidx20, align 4
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
55 ret void
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
56 }
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
57
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
58 attributes #0 = { nounwind }