[llvm-commits] [llvm] r63832 - /llvm/branches/Apple/Dib/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Bill Wendling
isanbard at gmail.com
Wed Feb 4 20:52:14 PST 2009
Author: void
Date: Wed Feb 4 22:52:13 2009
New Revision: 63832
URL: http://llvm.org/viewvc/llvm-project?rev=63832&view=rev
Log:
Pull r63831 into Dib:
Fix a bug where we were not emitting a cvt rnd sat node for converting
between a unsigned integer and signed integer.
Modified:
llvm/branches/Apple/Dib/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Modified: llvm/branches/Apple/Dib/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Dib/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=63832&r1=63831&r2=63832&view=diff
==============================================================================
--- llvm/branches/Apple/Dib/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original)
+++ llvm/branches/Apple/Dib/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Wed Feb 4 22:52:13 2009
@@ -1178,8 +1178,10 @@
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)
+ // If the src and dest types are the same and the conversion is between
+ // integer types of the same sign or two floats, no conversion is necessary.
+ if (DTy == STy &&
+ (Code == ISD::CVT_UU || Code == ISD::CVT_SS || Code == ISD::CVT_FF))
return Val;
FoldingSetNodeID ID;
More information about the llvm-commits
mailing list