projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
775bb80
)
Avoid generating a convert_rndsat node when the src and dest type are the same.
author
Mon P Wang
<wangmp@apple.com>
Thu, 11 Dec 2008 03:30:13 +0000
(
03:30
+0000)
committer
Mon P Wang
<wangmp@apple.com>
Thu, 11 Dec 2008 03:30:13 +0000
(
03:30
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60869
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
patch
|
blob
|
history
diff --git
a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index bb3b42c383f6c220d10e8f3216a602149ca0aafc..33eddae7f9022ee2cc19ac3a29e8ef7f79427170 100644
(file)
--- a/
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@
-1140,6
+1140,10
@@
SDValue SelectionDAG::getCondCode(ISD::CondCode Cond) {
SDValue SelectionDAG::getConvertRndSat(MVT VT, SDValue Val, SDValue DTy,
SDValue STy, SDValue Rnd, SDValue Sat,
ISD::CvtCode Code) {
+ // If the src and dest types are the same, no conversion is necessary.
+ if (DTy == STy)
+ return Val;
+
FoldingSetNodeID ID;
void* IP = 0;
if (SDNode *E = CSEMap.FindNodeOrInsertPos(ID, IP))