summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Sparc/SparcISelLowering.cpp
diff options
context:
space:
mode:
authorJames Y Knight <jyknight@google.com>2015-10-09 21:36:19 +0000
committerJames Y Knight <jyknight@google.com>2015-10-09 21:36:19 +0000
commit692e037499087e668aa71b018bf0d8fbbf1e35e9 (patch)
treeea1b26e110286e21ce1e5cf15361573c651b5ee4 /llvm/lib/Target/Sparc/SparcISelLowering.cpp
parent935cc537a6fc0af6f053489f80c88befd1d1ae93 (diff)
downloadbcm5719-llvm-692e037499087e668aa71b018bf0d8fbbf1e35e9.tar.gz
bcm5719-llvm-692e037499087e668aa71b018bf0d8fbbf1e35e9.zip
Fix assert when emitting llvm.pow.f86.
This occurred due to introducing the invalid i64 type after type legalization had already finished, in an attempt to workaround bitcast f64 -> v2i32 not doing constant folding. The *right* thing is to actually fix bitcast, but that has other complications. So, for now, just get rid of the broken workaround, and check in a test-case showing that it doesn't crash, with TODOs for emitting proper code. llvm-svn: 249908
Diffstat (limited to 'llvm/lib/Target/Sparc/SparcISelLowering.cpp')
-rw-r--r--llvm/lib/Target/Sparc/SparcISelLowering.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/Target/Sparc/SparcISelLowering.cpp b/llvm/lib/Target/Sparc/SparcISelLowering.cpp
index 9c8a0a64525..ef2806474a0 100644
--- a/llvm/lib/Target/Sparc/SparcISelLowering.cpp
+++ b/llvm/lib/Target/Sparc/SparcISelLowering.cpp
@@ -854,11 +854,10 @@ SparcTargetLowering::LowerCall_32(TargetLowering::CallLoweringInfo &CLI,
// Move from the float value from float registers into the
// integer registers.
- // TODO: this conversion is done in two steps, because
- // f64->i64 conversion is done efficiently, and i64->v2i32 is
- // basically a no-op. But f64->v2i32 is NOT done efficiently
- // for some reason.
- Arg = DAG.getNode(ISD::BITCAST, dl, MVT::i64, Arg);
+ // TODO: The f64 -> v2i32 conversion is super-inefficient for
+ // constants: it sticks them in the constant pool, then loads
+ // to a fp register, then stores to temp memory, then loads to
+ // integer registers.
Arg = DAG.getNode(ISD::BITCAST, dl, MVT::v2i32, Arg);
}
OpenPOWER on IntegriCloud