1
1
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
2
- ; RUN: llc < %s -mtriple=x86_64-- | FileCheck %s --check-prefixes=SDAG- X64
3
- ; RUN: llc < %s -mtriple=x86_64-- -fast-isel -fast-isel-abort=1 | FileCheck %s --check-prefixes=FASTISEL-X64
4
- ; RUN: llc < %s -mtriple=x86_64-- -global-isel -global-isel-abort=1 | FileCheck %s --check-prefixes=GISEL-X64
5
- ; RUN: llc < %s -mtriple=i686-- -mattr=-x87 | FileCheck %s --check-prefixes=SDAG- X86
2
+ ; RUN: llc < %s -mtriple=x86_64-- -mattr=-x87 | FileCheck %s --check-prefixes=X64
3
+ ; RUN: llc < %s -mtriple=x86_64-- -mattr=-x87 - fast-isel -fast-isel-abort=1 | FileCheck %s --check-prefixes=X64, FASTISEL-X64
4
+ ; RUN: llc < %s -mtriple=x86_64-- -mattr=-x87 - global-isel -global-isel-abort=1 | FileCheck %s --check-prefixes=GISEL-X64
5
+ ; RUN: llc < %s -mtriple=i686-- -mattr=-x87 | FileCheck %s --check-prefixes=X86
6
6
; RUN: llc < %s -mtriple=i686-- -mattr=-x87 -fast-isel -fast-isel-abort=1 | FileCheck %s --check-prefixes=FASTISEL-X86
7
7
; RUN: llc < %s -mtriple=i686-- -mattr=-x87 -global-isel -global-isel-abort=1 | FileCheck %s --check-prefixes=GISEL-X86
8
8
@@ -17,19 +17,23 @@ define float @test_float_abs(float %arg) {
17
17
; X86-NEXT: movl $2147483647, %eax # imm = 0x7FFFFFFF
18
18
; X86-NEXT: andl {{[0-9]+}}(%esp), %eax
19
19
; X86-NEXT: retl
20
+ ; X64-LABEL: test_float_abs:
21
+ ; X64: # %bb.0:
22
+ ; X64-NEXT: andps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
23
+ ; X64-NEXT: retq
20
24
;
21
25
; GISEL-X64-LABEL: test_float_abs:
22
26
; GISEL-X64: # %bb.0:
23
27
; GISEL-X64-NEXT: movd %xmm0, %eax
24
- ; GISEL-X64-NEXT: andl $2147483647 , %eax # imm = 0x7FFFFFFF
28
+ ; GISEL-X64-NEXT: andl {{\.?LCPI[0-9]+_[0-9]+}}(%rip) , %eax
25
29
; GISEL-X64-NEXT: movd %eax, %xmm0
26
30
; GISEL-X64-NEXT: retq
27
31
;
28
- ; SDAG- X86-LABEL: test_float_abs:
29
- ; SDAG- X86: # %bb.0:
30
- ; SDAG- X86-NEXT: movl $2147483647, %eax # imm = 0x7FFFFFFF
31
- ; SDAG- X86-NEXT: andl {{[0-9]+}}(%esp), %eax
32
- ; SDAG- X86-NEXT: retl
32
+ ; X86-LABEL: test_float_abs:
33
+ ; X86: # %bb.0:
34
+ ; X86-NEXT: movl $2147483647, %eax # imm = 0x7FFFFFFF
35
+ ; X86-NEXT: andl {{[0-9]+}}(%esp), %eax
36
+ ; X86-NEXT: retl
33
37
;
34
38
; FASTISEL-X86-LABEL: test_float_abs:
35
39
; FASTISEL-X86: # %bb.0:
@@ -58,21 +62,24 @@ define double @test_double_abs(double %arg) {
58
62
; X86-NEXT: movl $2147483647, %edx # imm = 0x7FFFFFFF
59
63
; X86-NEXT: andl {{[0-9]+}}(%esp), %edx
60
64
; X86-NEXT: retl
65
+ ; X64-LABEL: test_double_abs:
66
+ ; X64: # %bb.0:
67
+ ; X64-NEXT: andps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
68
+ ; X64-NEXT: retq
61
69
;
62
70
; GISEL-X64-LABEL: test_double_abs:
63
71
; GISEL-X64: # %bb.0:
64
- ; GISEL-X64-NEXT: movabsq $9223372036854775807, %rax # imm = 0x7FFFFFFFFFFFFFFF
65
- ; GISEL-X64-NEXT: movq %xmm0, %rcx
66
- ; GISEL-X64-NEXT: andq %rax, %rcx
67
- ; GISEL-X64-NEXT: movq %rcx, %xmm0
72
+ ; GISEL-X64-NEXT: movq %xmm0, %rax
73
+ ; GISEL-X64-NEXT: andq {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
74
+ ; GISEL-X64-NEXT: movq %rax, %xmm0
68
75
; GISEL-X64-NEXT: retq
69
76
;
70
- ; SDAG- X86-LABEL: test_double_abs:
71
- ; SDAG- X86: # %bb.0:
72
- ; SDAG- X86-NEXT: movl {{[0-9]+}}(%esp), %eax
73
- ; SDAG- X86-NEXT: movl $2147483647, %edx # imm = 0x7FFFFFFF
74
- ; SDAG- X86-NEXT: andl {{[0-9]+}}(%esp), %edx
75
- ; SDAG- X86-NEXT: retl
77
+ ; X86-LABEL: test_double_abs:
78
+ ; X86: # %bb.0:
79
+ ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
80
+ ; X86-NEXT: movl $2147483647, %edx # imm = 0x7FFFFFFF
81
+ ; X86-NEXT: andl {{[0-9]+}}(%esp), %edx
82
+ ; X86-NEXT: retl
76
83
;
77
84
; FASTISEL-X86-LABEL: test_double_abs:
78
85
; FASTISEL-X86: # %bb.0:
@@ -88,6 +95,10 @@ define double @test_double_abs(double %arg) {
88
95
; GISEL-X86-NEXT: andl {{[0-9]+}}(%esp), %eax
89
96
; GISEL-X86-NEXT: andl {{[0-9]+}}(%esp), %edx
90
97
; GISEL-X86-NEXT: retl
98
+
91
99
%abs = tail call double @llvm.fabs.f64 (double %arg )
92
100
ret double %abs
93
101
}
102
+
103
+ ;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:
104
+ ; FASTISEL-X64: {{.*}}
0 commit comments