summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-04-09 05:31:20 +0000
committerChris Lattner <sabre@nondot.org>2007-04-09 05:31:20 +0000
commit7b2decfa0adc317778f4b4a44f8063b876f65b59 (patch)
tree5a2a5989a52e042ef23462b0b683522a4c0939c2 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
parentea1369275b2dc448572d4e87b8eb27b87937a7b4 (diff)
downloadbcm5719-llvm-7b2decfa0adc317778f4b4a44f8063b876f65b59.tar.gz
bcm5719-llvm-7b2decfa0adc317778f4b4a44f8063b876f65b59.zip
implement CodeGen/X86/inline-asm-x-scalar.ll:test3
llvm-svn: 35802
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 59cba1b075d..9df52014602 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -2656,13 +2656,20 @@ void RegsForValue::getCopyToRegs(SDOperand Val, SelectionDAG &DAG,
if (MVT::isVector(RegVT)) {
assert(Val.getValueType() == MVT::Vector &&"Not a vector-vector cast?");
Val = DAG.getNode(ISD::VBIT_CONVERT, RegVT, Val);
- } else if (MVT::isInteger(RegVT)) {
+ } else if (MVT::isInteger(RegVT) && MVT::isInteger(Val.getValueType())) {
if (RegVT < ValueVT)
Val = DAG.getNode(ISD::TRUNCATE, RegVT, Val);
else
Val = DAG.getNode(ISD::ANY_EXTEND, RegVT, Val);
- } else
+ } else if (MVT::isFloatingPoint(RegVT) &&
+ MVT::isFloatingPoint(Val.getValueType())) {
Val = DAG.getNode(ISD::FP_EXTEND, RegVT, Val);
+ } else if (MVT::getSizeInBits(RegVT) ==
+ MVT::getSizeInBits(Val.getValueType())) {
+ Val = DAG.getNode(ISD::BIT_CONVERT, RegVT, Val);
+ } else {
+ assert(0 && "Unknown mismatch!");
+ }
}
Chain = DAG.getCopyToReg(Chain, Regs[0], Val, Flag);
Flag = Chain.getValue(1);
OpenPOWER on IntegriCloud