diff options
author | Vincent Lejeune <[email protected]> | 2012-07-14 20:33:23 +0200 |
---|---|---|
committer | Tom Stellard <[email protected]> | 2012-07-23 15:04:36 +0000 |
commit | bc4b4c605cc04138e5209782fa5939bfd71930bd (patch) | |
tree | 007f98840b5688599d36789edb49f8b9af282945 /src/gallium/drivers/radeon | |
parent | 044de40cb0c6af54d99252f55145972780362afa (diff) |
radeon/llvm: Fix a bug with IF LOGICALNZ with int operand
Signed-off-by: Tom Stellard <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon')
-rw-r--r-- | src/gallium/drivers/radeon/AMDILISelLowering.cpp | 4 | ||||
-rw-r--r-- | src/gallium/drivers/radeon/R600CodeEmitter.cpp | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/gallium/drivers/radeon/AMDILISelLowering.cpp b/src/gallium/drivers/radeon/AMDILISelLowering.cpp index 81951c15755..fb335835425 100644 --- a/src/gallium/drivers/radeon/AMDILISelLowering.cpp +++ b/src/gallium/drivers/radeon/AMDILISelLowering.cpp @@ -1378,7 +1378,7 @@ AMDILTargetLowering::LowerSETCC(SDValue Op, SelectionDAG &DAG) const Cond = DAG.getNode( ISD::SELECT_CC, Op.getDebugLoc(), - LHS.getValueType(), + MVT::i32, LHS, RHS, DAG.getConstant(-1, MVT::i32), DAG.getConstant(0, MVT::i32), @@ -1496,7 +1496,7 @@ AMDILTargetLowering::LowerBR_CC(SDValue Op, SelectionDAG &DAG) const CmpValue = DAG.getNode( ISD::SELECT_CC, Op.getDebugLoc(), - LHS.getValueType(), + MVT::i32, LHS, RHS, DAG.getConstant(-1, MVT::i32), DAG.getConstant(0, MVT::i32), diff --git a/src/gallium/drivers/radeon/R600CodeEmitter.cpp b/src/gallium/drivers/radeon/R600CodeEmitter.cpp index 1de2d9e07a1..0c84633417a 100644 --- a/src/gallium/drivers/radeon/R600CodeEmitter.cpp +++ b/src/gallium/drivers/radeon/R600CodeEmitter.cpp @@ -110,6 +110,7 @@ enum InstrTypes { enum FCInstr { FC_IF = 0, + FC_IF_INT, FC_ELSE, FC_ENDIF, FC_BGNLOOP, @@ -535,8 +536,9 @@ void R600CodeEmitter::EmitFCInstr(MachineInstr &MI) instr = FC_CONTINUE; break; case AMDGPU::IF_LOGICALNZ_f32: - case AMDGPU::IF_LOGICALNZ_i32: instr = FC_IF; + case AMDGPU::IF_LOGICALNZ_i32: + instr = FC_IF_INT; break; case AMDGPU::IF_LOGICALZ_f32: abort(); |