diff options
author | Tom Stellard <thomas.stellard@amd.com> | 2013-03-08 15:36:57 +0000 |
---|---|---|
committer | Tom Stellard <thomas.stellard@amd.com> | 2013-03-08 15:36:57 +0000 |
commit | b1588fc0572640c0ccf6bea1a6a31d4c858b64e8 (patch) | |
tree | 2fe1e1e0674b18f11dfb7d93d948fb8e0c724b63 /llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | |
parent | 2bc2730765bfbe444321841769d57d8fdf120cc0 (diff) | |
download | bcm5719-llvm-b1588fc0572640c0ccf6bea1a6a31d4c858b64e8.tar.gz bcm5719-llvm-b1588fc0572640c0ccf6bea1a6a31d4c858b64e8.zip |
DAGCombiner: Use correct value type for checking legality of BR_CC v3
LegalizeDAG.cpp uses the value of the comparison operands when checking
the legality of BR_CC, so DAGCombiner should do the same.
v2:
- Expand more BR_CC value types for NVPTX
v3:
- Expand correct BR_CC value types for Hexagon, Mips, and XCore.
llvm-svn: 176694
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index ec52d7e906b..716fb93b29b 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -6709,7 +6709,8 @@ SDValue DAGCombiner::visitBRCOND(SDNode *N) { // fold a brcond with a setcc condition into a BR_CC node if BR_CC is legal // on the target. if (N1.getOpcode() == ISD::SETCC && - TLI.isOperationLegalOrCustom(ISD::BR_CC, MVT::Other)) { + TLI.isOperationLegalOrCustom(ISD::BR_CC, + N1.getOperand(0).getValueType())) { return DAG.getNode(ISD::BR_CC, N->getDebugLoc(), MVT::Other, Chain, N1.getOperand(2), N1.getOperand(0), N1.getOperand(1), N2); |