[llvm] r178794 - Hexagon: Expand br_cc.

Tom Stellard tom at stellard.net
Fri Apr 19 20:38:59 PDT 2013


On Thu, Apr 04, 2013 at 09:18:26PM -0000, Jyotsna Verma wrote:
> Author: jverma
> Date: Thu Apr  4 16:18:26 2013
> New Revision: 178794
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=178794&view=rev
> Log:
> Hexagon: Expand br_cc.
> 
> It fixes following tests for Hexagon:
> 
> CodeGen/Generic/2003-07-29-BadConstSbyte.ll
> CodeGen/Generic/2005-10-21-longlonggtu.ll
> CodeGen/Generic/2009-04-28-i128-cmp-crash.ll
> CodeGen/Generic/MachineBranchProb.ll
> CodeGen/Generic/builtin-expect.ll
> CodeGen/Generic/pr12507.ll
> 
> 
> Modified:
>     llvm/trunk/lib/Target/Hexagon/HexagonISelLowering.cpp
> 
> Modified: llvm/trunk/lib/Target/Hexagon/HexagonISelLowering.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/HexagonISelLowering.cpp?rev=178794&r1=178793&r2=178794&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/Hexagon/HexagonISelLowering.cpp (original)
> +++ llvm/trunk/lib/Target/Hexagon/HexagonISelLowering.cpp Thu Apr  4 16:18:26 2013
> @@ -1370,10 +1370,12 @@ HexagonTargetLowering::HexagonTargetLowe
>      // Increase jump tables cutover to 5, was 4.
>      setMinimumJumpTableEntries(5);
>  
> +    setOperationAction(ISD::BR_CC, MVT::Other, Expand);

This shouldn't be necessary.  The legality of BR_CC is based on the type
of its comparison operands.  If any of the SelectionDAG code is still
using MVT::Other to check the legality of BR_CC then this is a bug that
should be fixed.

-Tom

>      setOperationAction(ISD::BR_CC, MVT::f32, Expand);
>      setOperationAction(ISD::BR_CC, MVT::f64, Expand);
>      setOperationAction(ISD::BR_CC, MVT::i1,  Expand);
>      setOperationAction(ISD::BR_CC, MVT::i32, Expand);
> +    setOperationAction(ISD::BR_CC, MVT::i64, Expand);
>  
>      setOperationAction(ISD::MEMBARRIER, MVT::Other, Custom);
>      setOperationAction(ISD::ATOMIC_FENCE, MVT::Other, Custom);
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list