[llvm] r360097 - [FastISel] Pass the fneg input operand to hasTrivialKill in FastISel::selectFNeg.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon May 6 16:09:10 PDT 2019
Author: ctopper
Date: Mon May 6 16:09:09 2019
New Revision: 360097
URL: http://llvm.org/viewvc/llvm-project?rev=360097&view=rev
Log:
[FastISel] Pass the fneg input operand to hasTrivialKill in FastISel::selectFNeg.
We're trying to calculate the kill flag for OpReg which is the input so we need to pass the input here.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp
llvm/trunk/test/CodeGen/X86/fast-isel-fneg-kill.ll
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp?rev=360097&r1=360096&r2=360097&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp Mon May 6 16:09:09 2019
@@ -1719,7 +1719,7 @@ bool FastISel::selectFNeg(const User *I)
unsigned OpReg = getRegForValue(X);
if (!OpReg)
return false;
- bool OpRegIsKill = hasTrivialKill(I);
+ bool OpRegIsKill = hasTrivialKill(X);
// If the target has ISD::FNEG, use it.
EVT VT = TLI.getValueType(DL, I->getType());
Modified: llvm/trunk/test/CodeGen/X86/fast-isel-fneg-kill.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/fast-isel-fneg-kill.ll?rev=360097&r1=360096&r2=360097&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/fast-isel-fneg-kill.ll (original)
+++ llvm/trunk/test/CodeGen/X86/fast-isel-fneg-kill.ll Mon May 6 16:09:09 2019
@@ -9,7 +9,7 @@ define void @goo(double* %x, double* %y)
; CHECK-NEXT: %[[REG1:.*]]:gr64 = COPY killed %[[REG0]]
; CHECK-NEXT: %[[REG3:.*]]:gr64 = COPY killed %[[REG2]]
; CHECK-NEXT: %[[REG10:.*]]:fr64 = MOVSDrm %[[REG1]], 1, $noreg, 0, $noreg :: (load 8 from %ir.x)
-; CHECK-NEXT: %[[REG6:.*]]:gr64 = MOVSDto64rr %[[REG10]]
+; CHECK-NEXT: %[[REG6:.*]]:gr64 = MOVSDto64rr killed %[[REG10]]
; CHECK-NEXT: %[[REG7:.*]]:gr64 = MOV64ri -9223372036854775808
; CHECK-NEXT: %[[REG8:.*]]:gr64 = XOR64rr killed %[[REG6]], %[[REG7]], implicit-def $eflags
; CHECK-NEXT: %[[REG9:.*]]:fr64 = MOV64toSDrr killed %[[REG8]]
More information about the llvm-commits
mailing list