[llvm-commits] [llvm] r56069 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
Dan Gohman
gohman at apple.com
Wed Sep 10 14:01:31 PDT 2008
Author: djg
Date: Wed Sep 10 16:01:31 2008
New Revision: 56069
URL: http://llvm.org/viewvc/llvm-project?rev=56069&view=rev
Log:
FastISel support for i1 PHI nodes.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp?rev=56069&r1=56068&r2=56069&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp Wed Sep 10 16:01:31 2008
@@ -5612,8 +5612,13 @@
// exactly one register for each non-void instruction.
MVT VT = TLI.getValueType(PN->getType(), /*AllowUnknown=*/true);
if (VT == MVT::Other || !TLI.isTypeLegal(VT)) {
- SDL->PHINodesToUpdate.resize(OrigNumPHINodesToUpdate);
- return false;
+ // Promote MVT::i1.
+ if (VT == MVT::i1)
+ VT = TLI.getTypeToTransformTo(VT);
+ else {
+ SDL->PHINodesToUpdate.resize(OrigNumPHINodesToUpdate);
+ return false;
+ }
}
Value *PHIOp = PN->getIncomingValueForBlock(LLVMBB);
More information about the llvm-commits
mailing list