1
- ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2
- ; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -global-isel=0 -mattr=+x87,+sse,+sse2 -o - | FileCheck %s --check-prefix= X64
3
- ; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -global -isel=1 -mattr=+x87,+sse,+sse2 -o - | FileCheck %s -check-prefixes=GISEL
4
-
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=X64,SDAG- X64
3
+ ; RUN: llc < %s -mtriple=x86_64-- -fast -isel -fast-isel-abort=1 | FileCheck %s -- check-prefixes=X64,FASTISEL-X64
4
+ ; RUN: llc < %s -mtriple=x86_64-- -global-isel -global-isel-abort=1 | FileCheck %s --check-prefixes=X64,GISEL-X64
5
5
define float @test_float_abs (float %arg ) {
6
- ; X64-LABEL: test_float_abs:
7
- ; X64: # %bb.0:
8
- ; X64-NEXT: andps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
9
- ; X64-NEXT: retq
6
+ ; SDAG-X64-LABEL: test_float_abs:
7
+ ; SDAG-X64: # %bb.0:
8
+ ; SDAG-X64-NEXT: andps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
9
+ ; SDAG-X64-NEXT: retq
10
+ ;
11
+ ; FASTISEL-X64-LABEL: test_float_abs:
12
+ ; FASTISEL-X64: # %bb.0:
13
+ ; FASTISEL-X64-NEXT: andps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
14
+ ; FASTISEL-X64-NEXT: retq
10
15
;
11
- ; GISEL-LABEL: test_float_abs:
12
- ; GISEL: # %bb.0:
13
- ; GISEL-NEXT: movd %xmm0, %eax
14
- ; GISEL-NEXT: andl $2147483647, %eax # imm = 0x7FFFFFFF
15
- ; GISEL-NEXT: movd %eax, %xmm0
16
- ; GISEL-NEXT: retq
16
+ ; GISEL-X64- LABEL: test_float_abs:
17
+ ; GISEL-X64 : # %bb.0:
18
+ ; GISEL-X64- NEXT: movd %xmm0, %eax
19
+ ; GISEL-X64- NEXT: andl $2147483647, %eax # imm = 0x7FFFFFFF
20
+ ; GISEL-X64- NEXT: movd %eax, %xmm0
21
+ ; GISEL-X64- NEXT: retq
17
22
%abs = tail call float @llvm.fabs.f32 (float %arg )
18
23
ret float %abs
19
24
}
20
25
21
26
define double @test_double_abs (double %arg ) {
22
- ; X64-LABEL: test_double_abs:
23
- ; X64: # %bb.0:
24
- ; X64-NEXT: andps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
25
- ; X64-NEXT: retq
27
+ ; SDAG- X64-LABEL: test_double_abs:
28
+ ; SDAG- X64: # %bb.0:
29
+ ; SDAG- X64-NEXT: andps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
30
+ ; SDAG- X64-NEXT: retq
26
31
;
27
- ; GISEL-LABEL: test_double_abs:
28
- ; GISEL: # %bb.0:
29
- ; GISEL-NEXT: movabsq $9223372036854775807, %rax # imm = 0x7FFFFFFFFFFFFFFF
30
- ; GISEL-NEXT: movq %xmm0, %rcx
31
- ; GISEL-NEXT: andq %rax, %rcx
32
- ; GISEL-NEXT: movq %rcx, %xmm0
33
- ; GISEL-NEXT: retq
32
+ ; FASTISEL-X64-LABEL: test_double_abs:
33
+ ; FASTISEL-X64: # %bb.0:
34
+ ; FASTISEL-X64-NEXT: andps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
35
+ ; FASTISEL-X64-NEXT: retq
36
+ ;
37
+ ; GISEL-X64-LABEL: test_double_abs:
38
+ ; GISEL-X64: # %bb.0:
39
+ ; GISEL-X64-NEXT: movabsq $9223372036854775807, %rax # imm = 0x7FFFFFFFFFFFFFFF
40
+ ; GISEL-X64-NEXT: movq %xmm0, %rcx
41
+ ; GISEL-X64-NEXT: andq %rax, %rcx
42
+ ; GISEL-X64-NEXT: movq %rcx, %xmm0
43
+ ; GISEL-X64-NEXT: retq
34
44
%abs = tail call double @llvm.fabs.f64 (double %arg )
35
45
ret double %abs
36
46
}
@@ -41,12 +51,6 @@ define x86_fp80 @test_x86_fp80_abs(x86_fp80 %arg) {
41
51
; X64-NEXT: fldt {{[0-9]+}}(%rsp)
42
52
; X64-NEXT: fabs
43
53
; X64-NEXT: retq
44
- ;
45
- ; GISEL-LABEL: test_x86_fp80_abs:
46
- ; GISEL: # %bb.0:
47
- ; GISEL-NEXT: fldt {{[0-9]+}}(%rsp)
48
- ; GISEL-NEXT: fabs
49
- ; GISEL-NEXT: retq
50
54
%abs = tail call x86_fp80 @llvm.fabs.f80 (x86_fp80 %arg )
51
55
ret x86_fp80 %abs
52
56
}
0 commit comments