aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-01-15 22:22:01 +0000
committerChris Lattner <sabre@nondot.org>2006-01-15 22:22:01 +0000
commitf7511b494310141fd0d9668025172df1c626964d (patch)
tree38b2cbd28e2493350d8c537104b6fde6898bea32 /lib
parente2ba1b32ecf5a6951abe5cee3a4f9878be530118 (diff)
downloadexternal_llvm-f7511b494310141fd0d9668025172df1c626964d.zip
external_llvm-f7511b494310141fd0d9668025172df1c626964d.tar.gz
external_llvm-f7511b494310141fd0d9668025172df1c626964d.tar.bz2
Make sure that bool,byte and short arguments are the right type when loaded
from memory. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25346 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/Sparc/SparcISelDAGToDAG.cpp1
-rw-r--r--lib/Target/SparcV8/SparcV8ISelDAGToDAG.cpp1
2 files changed, 2 insertions, 0 deletions
diff --git a/lib/Target/Sparc/SparcISelDAGToDAG.cpp b/lib/Target/Sparc/SparcISelDAGToDAG.cpp
index 56dc26a..08c6636 100644
--- a/lib/Target/Sparc/SparcISelDAGToDAG.cpp
+++ b/lib/Target/Sparc/SparcISelDAGToDAG.cpp
@@ -243,6 +243,7 @@ SparcV8TargetLowering::LowerArguments(Function &F, SelectionDAG &DAG) {
Load = DAG.getExtLoad(LoadOp, MVT::i32, Root, FIPtr,
DAG.getSrcValue(0), ObjectVT);
+ Load = DAG.getNode(ISD::TRUNCATE, ObjectVT, Load);
}
ArgValues.push_back(Load);
}
diff --git a/lib/Target/SparcV8/SparcV8ISelDAGToDAG.cpp b/lib/Target/SparcV8/SparcV8ISelDAGToDAG.cpp
index 56dc26a..08c6636 100644
--- a/lib/Target/SparcV8/SparcV8ISelDAGToDAG.cpp
+++ b/lib/Target/SparcV8/SparcV8ISelDAGToDAG.cpp
@@ -243,6 +243,7 @@ SparcV8TargetLowering::LowerArguments(Function &F, SelectionDAG &DAG) {
Load = DAG.getExtLoad(LoadOp, MVT::i32, Root, FIPtr,
DAG.getSrcValue(0), ObjectVT);
+ Load = DAG.getNode(ISD::TRUNCATE, ObjectVT, Load);
}
ArgValues.push_back(Load);
}