[Mesa-dev] [PATCH 1/4] radon/llvm: br_cc f32 now lowered without cast
Tom Stellard
tom at stellard.net
Tue Sep 4 08:18:19 PDT 2012
On Tue, Sep 04, 2012 at 05:04:27PM +0200, Vincent Lejeune wrote:
> ---
> src/gallium/drivers/radeon/R600ISelLowering.cpp | 33 ++++++++++++++++++-------
> 1 file changed, 24 insertions(+), 9 deletions(-)
>
Just a few coding style issues that I noted with patched 3 and 4. Also,
you can remove the 'conflicts:' line from the commit messages.
With those changes, the entire series is:
Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
> diff --git a/src/gallium/drivers/radeon/R600ISelLowering.cpp b/src/gallium/drivers/radeon/R600ISelLowering.cpp
> index fec9d4e..60c8ade 100644
> --- a/src/gallium/drivers/radeon/R600ISelLowering.cpp
> +++ b/src/gallium/drivers/radeon/R600ISelLowering.cpp
> @@ -34,7 +34,8 @@ R600TargetLowering::R600TargetLowering(TargetMachine &TM) :
> computeRegisterProperties();
>
> setOperationAction(ISD::BR_CC, MVT::i32, Custom);
> -
> + setOperationAction(ISD::BR_CC, MVT::f32, Custom);
> +
> setOperationAction(ISD::FSUB, MVT::f32, Expand);
>
> setOperationAction(ISD::INTRINSIC_VOID, MVT::Other, Custom);
> @@ -338,14 +339,28 @@ SDValue R600TargetLowering::LowerBR_CC(SDValue Op, SelectionDAG &DAG) const
> SDValue JumpT = Op.getOperand(4);
> SDValue CmpValue;
> SDValue Result;
> - CmpValue = DAG.getNode(
> - ISD::SELECT_CC,
> - Op.getDebugLoc(),
> - MVT::i32,
> - LHS, RHS,
> - DAG.getConstant(-1, MVT::i32),
> - DAG.getConstant(0, MVT::i32),
> - CC);
> +
> + if (LHS.getValueType() == MVT::i32) {
> + CmpValue = DAG.getNode(
> + ISD::SELECT_CC,
> + Op.getDebugLoc(),
> + MVT::i32,
> + LHS, RHS,
> + DAG.getConstant(-1, MVT::i32),
> + DAG.getConstant(0, MVT::i32),
> + CC);
> + } else if (LHS.getValueType() == MVT::f32) {
> + CmpValue = DAG.getNode(
> + ISD::SELECT_CC,
> + Op.getDebugLoc(),
> + MVT::f32,
> + LHS, RHS,
> + DAG.getConstantFP(1.0f, MVT::f32),
> + DAG.getConstantFP(0.0f, MVT::f32),
> + CC);
> + } else {
> + assert(0 && "Not valid type for br_cc");
> + }
> Result = DAG.getNode(
> AMDGPUISD::BRANCH_COND,
> CmpValue.getDebugLoc(),
> --
> 1.7.11.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list