Skip to content

Commit 3ccc01b

Browse files
author
mattarde
committed
update test
1 parent 8a80539 commit 3ccc01b

File tree

1 file changed

+35
-31
lines changed

1 file changed

+35
-31
lines changed

llvm/test/CodeGen/X86/isel-fabs.ll

Lines changed: 35 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,46 @@
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
55
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
1015
;
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
1722
%abs = tail call float @llvm.fabs.f32(float %arg)
1823
ret float %abs
1924
}
2025

2126
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
2631
;
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
3444
%abs = tail call double @llvm.fabs.f64(double %arg)
3545
ret double %abs
3646
}
@@ -41,12 +51,6 @@ define x86_fp80 @test_x86_fp80_abs(x86_fp80 %arg) {
4151
; X64-NEXT: fldt {{[0-9]+}}(%rsp)
4252
; X64-NEXT: fabs
4353
; 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
5054
%abs = tail call x86_fp80 @llvm.fabs.f80(x86_fp80 %arg)
5155
ret x86_fp80 %abs
5256
}

0 commit comments

Comments
 (0)