Skip to content

Commit 64c2768

Browse files
author
himadhith
committed
Changed the patch to work only with Integer vector types
1 parent b5c2ce7 commit 64c2768

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4579,14 +4579,12 @@ bool PPCDAGToDAGISel::trySETCC(SDNode *N) {
45794579
EVT VT = LHS.getValueType();
45804580

45814581
// Only optimize for integer types (avoid FP completely)
4582-
bool IsIntegerType =
4583-
VT.isInteger() ||
4584-
(VT.isVector() && VT.getVectorElementType().isInteger());
4585-
if(IsIntegerType){
4586-
if (ISD::isBuildVectorAllZeros(RHS.getNode()))
4587-
CC = ISD::SETUGT;
4588-
else if (ISD::isBuildVectorAllZeros(LHS.getNode()))
4589-
CC = ISD::SETULT;}
4582+
if (VT.getVectorElementType().isInteger()) {
4583+
if (ISD::isBuildVectorAllZeros(RHS.getNode()))
4584+
CC = ISD::SETUGT;
4585+
else if (ISD::isBuildVectorAllZeros(LHS.getNode()))
4586+
CC = ISD::SETULT;
4587+
}
45904588
}
45914589
EVT VecVT = LHS.getValueType();
45924590
bool Swap, Negate;

0 commit comments

Comments
 (0)