Skip to content

Commit ccb55c7

Browse files
committed
[X86] Add test case to show that we don't set the kill flag properly for fast isel handling of fneg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360096 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 99c7e3c commit ccb55c7

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2+
; RUN: llc < %s -fast-isel -fast-isel-abort=3 -mtriple=x86_64-apple-darwin10 -stop-after=expand-isel-pseudos | FileCheck %s
3+
4+
; Make sure we output the right kill flag for the xor conversion.
5+
6+
define void @goo(double* %x, double* %y) nounwind {
7+
; CHECK: %[[REG2:.*]]:gr64 = COPY $rsi
8+
; CHECK-NEXT: %[[REG0:.*]]:gr64 = COPY $rdi
9+
; CHECK-NEXT: %[[REG1:.*]]:gr64 = COPY killed %[[REG0]]
10+
; CHECK-NEXT: %[[REG3:.*]]:gr64 = COPY killed %[[REG2]]
11+
; CHECK-NEXT: %[[REG10:.*]]:fr64 = MOVSDrm %[[REG1]], 1, $noreg, 0, $noreg :: (load 8 from %ir.x)
12+
; CHECK-NEXT: %[[REG6:.*]]:gr64 = MOVSDto64rr %[[REG10]]
13+
; CHECK-NEXT: %[[REG7:.*]]:gr64 = MOV64ri -9223372036854775808
14+
; CHECK-NEXT: %[[REG8:.*]]:gr64 = XOR64rr killed %[[REG6]], %[[REG7]], implicit-def $eflags
15+
; CHECK-NEXT: %[[REG9:.*]]:fr64 = MOV64toSDrr killed %[[REG8]]
16+
; CHECK-NEXT: MOVSDmr %[[REG3]], 1, $noreg, 0, $noreg, killed %[[REG9]] :: (store 8 into %ir.y)
17+
; CHECK-NEXT: RETQ
18+
%a = load double, double* %x
19+
%b = fsub double -0.0, %a
20+
store double %b, double* %y
21+
ret void
22+
}

0 commit comments

Comments
 (0)