@@ -1681,6 +1681,8 @@ HexagonTargetLowering::HexagonTargetLowering(const TargetMachine &TM,
16811681 setOperationAction (ISD::STORE, VT, Custom);
16821682 }
16831683
1684+ setOperationAction (ISD::STORE, MVT::v128i1, Custom);
1685+
16841686 for (MVT VT : {MVT::v2i16, MVT::v4i8, MVT::v8i8, MVT::v2i32, MVT::v4i16,
16851687 MVT::v2i32}) {
16861688 setCondCodeAction (ISD::SETNE, VT, Expand);
@@ -1694,6 +1696,8 @@ HexagonTargetLowering::HexagonTargetLowering(const TargetMachine &TM,
16941696
16951697 // Custom-lower bitcasts from i8 to v8i1.
16961698 setOperationAction (ISD::BITCAST, MVT::i8 , Custom);
1699+ setOperationAction (ISD::BITCAST, MVT::i32 , Custom);
1700+ setOperationAction (ISD::BITCAST, MVT::i64 , Custom);
16971701 setOperationAction (ISD::SETCC, MVT::v2i16, Custom);
16981702 setOperationAction (ISD::VSELECT, MVT::v4i8, Custom);
16991703 setOperationAction (ISD::VSELECT, MVT::v2i16, Custom);
@@ -3077,12 +3081,6 @@ void
30773081HexagonTargetLowering::LowerOperationWrapper (SDNode *N,
30783082 SmallVectorImpl<SDValue> &Results,
30793083 SelectionDAG &DAG) const {
3080- if (isHvxOperation (N)) {
3081- LowerHvxOperationWrapper (N, Results, DAG);
3082- if (!Results.empty ())
3083- return ;
3084- }
3085-
30863084 // We are only custom-lowering stores to verify the alignment of the
30873085 // address if it is a compile-time constant. Since a store can be modified
30883086 // during type-legalization (the value being stored may need legalization),
@@ -3096,12 +3094,6 @@ void
30963094HexagonTargetLowering::ReplaceNodeResults (SDNode *N,
30973095 SmallVectorImpl<SDValue> &Results,
30983096 SelectionDAG &DAG) const {
3099- if (isHvxOperation (N)) {
3100- ReplaceHvxNodeResults (N, Results, DAG);
3101- if (!Results.empty ())
3102- return ;
3103- }
3104-
31053097 const SDLoc &dl (N);
31063098 switch (N->getOpcode ()) {
31073099 case ISD::SRL:
@@ -3386,25 +3378,12 @@ EVT HexagonTargetLowering::getOptimalMemOpType(
33863378 return MVT::Other;
33873379}
33883380
3389- bool HexagonTargetLowering::allowsMemoryAccess (LLVMContext &Context,
3390- const DataLayout &DL, EVT VT, unsigned AddrSpace, unsigned Alignment,
3391- MachineMemOperand::Flags Flags, bool *Fast) const {
3392- MVT SVT = VT.getSimpleVT ();
3393- if (Subtarget.isHVXVectorType (SVT, true ))
3394- return allowsHvxMemoryAccess (SVT, Alignment, Flags, Fast);
3395- return TargetLoweringBase::allowsMemoryAccess (
3396- Context, DL, VT, AddrSpace, Alignment, Flags, Fast);
3397- }
3398-
33993381bool HexagonTargetLowering::allowsMisalignedMemoryAccesses (
3400- EVT VT, unsigned AddrSpace, unsigned Alignment,
3401- MachineMemOperand::Flags Flags, bool *Fast) const {
3402- MVT SVT = VT.getSimpleVT ();
3403- if (Subtarget.isHVXVectorType (SVT, true ))
3404- return allowsHvxMisalignedMemoryAccesses (SVT, Alignment, Flags, Fast);
3382+ EVT VT, unsigned AS, unsigned Align, MachineMemOperand::Flags Flags,
3383+ bool *Fast) const {
34053384 if (Fast)
34063385 *Fast = false ;
3407- return false ;
3386+ return Subtarget. isHVXVectorType (VT. getSimpleVT ()) ;
34083387}
34093388
34103389std::pair<const TargetRegisterClass*, uint8_t >
0 commit comments