Index: llvm/trunk/lib/Target/X86/X86ISelLowering.h =================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.h +++ llvm/trunk/lib/Target/X86/X86ISelLowering.h @@ -447,8 +447,6 @@ /// SSE4A Extraction and Insertion. EXTRQI, INSERTQI, - // XOP variable/immediate rotations. - VPROT, VPROTI, // XOP arithmetic/logical shifts. VPSHA, VPSHL, // XOP signed/unsigned integer comparisons. Index: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp =================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp @@ -22667,7 +22667,7 @@ assert((Opcode == ISD::ROTL) && "Only ROTL supported"); // XOP has 128-bit vector variable + immediate rotates. - // +ve/-ve Amt = rotate left/right. + // +ve/-ve Amt = rotate left/right - just need to handle ISD::ROTL. // Split 256-bit integers. if (VT.is256BitVector()) @@ -22680,13 +22680,13 @@ if (auto *RotateConst = BVAmt->getConstantSplatNode()) { uint64_t RotateAmt = RotateConst->getAPIntValue().getZExtValue(); assert(RotateAmt < EltSizeInBits && "Rotation out of range"); - return DAG.getNode(X86ISD::VPROTI, DL, VT, R, + return DAG.getNode(X86ISD::VROTLI, DL, VT, R, DAG.getConstant(RotateAmt, DL, MVT::i8)); } } // Use general rotate by variable (per-element). - return DAG.getNode(X86ISD::VPROT, DL, VT, R, Amt); + return Op; } static SDValue LowerXALUO(SDValue Op, SelectionDAG &DAG) { @@ -24610,8 +24610,6 @@ case X86ISD::RDSEED: return "X86ISD::RDSEED"; case X86ISD::VPMADDUBSW: return "X86ISD::VPMADDUBSW"; case X86ISD::VPMADDWD: return "X86ISD::VPMADDWD"; - case X86ISD::VPROT: return "X86ISD::VPROT"; - case X86ISD::VPROTI: return "X86ISD::VPROTI"; case X86ISD::VPSHA: return "X86ISD::VPSHA"; case X86ISD::VPSHL: return "X86ISD::VPSHL"; case X86ISD::VPCOM: return "X86ISD::VPCOM"; Index: llvm/trunk/lib/Target/X86/X86InstrFragmentsSIMD.td =================================================================== --- llvm/trunk/lib/Target/X86/X86InstrFragmentsSIMD.td +++ llvm/trunk/lib/Target/X86/X86InstrFragmentsSIMD.td @@ -213,9 +213,6 @@ def X86vrotli : SDNode<"X86ISD::VROTLI", X86vshiftimm>; def X86vrotri : SDNode<"X86ISD::VROTRI", X86vshiftimm>; -def X86vprot : SDNode<"X86ISD::VPROT", X86vshiftvariable>; -def X86vproti : SDNode<"X86ISD::VPROTI", X86vshiftimm>; - def X86vpshl : SDNode<"X86ISD::VPSHL", X86vshiftvariable>; def X86vpsha : SDNode<"X86ISD::VPSHA", X86vshiftvariable>; Index: llvm/trunk/lib/Target/X86/X86InstrXOP.td =================================================================== --- llvm/trunk/lib/Target/X86/X86InstrXOP.td +++ llvm/trunk/lib/Target/X86/X86InstrXOP.td @@ -115,10 +115,10 @@ } let ExeDomain = SSEPackedInt in { - defm VPROTB : xop3op<0x90, "vprotb", X86vprot, v16i8>; - defm VPROTD : xop3op<0x92, "vprotd", X86vprot, v4i32>; - defm VPROTQ : xop3op<0x93, "vprotq", X86vprot, v2i64>; - defm VPROTW : xop3op<0x91, "vprotw", X86vprot, v8i16>; + defm VPROTB : xop3op<0x90, "vprotb", rotl, v16i8>; + defm VPROTD : xop3op<0x92, "vprotd", rotl, v4i32>; + defm VPROTQ : xop3op<0x93, "vprotq", rotl, v2i64>; + defm VPROTW : xop3op<0x91, "vprotw", rotl, v8i16>; defm VPSHAB : xop3op<0x98, "vpshab", X86vpsha, v16i8>; defm VPSHAD : xop3op<0x9A, "vpshad", X86vpsha, v4i32>; defm VPSHAQ : xop3op<0x9B, "vpshaq", X86vpsha, v2i64>; @@ -144,10 +144,10 @@ } let ExeDomain = SSEPackedInt in { - defm VPROTB : xop3opimm<0xC0, "vprotb", X86vproti, v16i8>; - defm VPROTD : xop3opimm<0xC2, "vprotd", X86vproti, v4i32>; - defm VPROTQ : xop3opimm<0xC3, "vprotq", X86vproti, v2i64>; - defm VPROTW : xop3opimm<0xC1, "vprotw", X86vproti, v8i16>; + defm VPROTB : xop3opimm<0xC0, "vprotb", X86vrotli, v16i8>; + defm VPROTD : xop3opimm<0xC2, "vprotd", X86vrotli, v4i32>; + defm VPROTQ : xop3opimm<0xC3, "vprotq", X86vrotli, v2i64>; + defm VPROTW : xop3opimm<0xC1, "vprotw", X86vrotli, v8i16>; } // Instruction where second source can be memory, but third must be register Index: llvm/trunk/lib/Target/X86/X86IntrinsicsInfo.h =================================================================== --- llvm/trunk/lib/Target/X86/X86IntrinsicsInfo.h +++ llvm/trunk/lib/Target/X86/X86IntrinsicsInfo.h @@ -1597,14 +1597,14 @@ X86_INTRINSIC_DATA(xop_vpermil2ps, INTR_TYPE_4OP, X86ISD::VPERMIL2, 0), X86_INTRINSIC_DATA(xop_vpermil2ps_256, INTR_TYPE_4OP, X86ISD::VPERMIL2, 0), X86_INTRINSIC_DATA(xop_vpperm, INTR_TYPE_3OP, X86ISD::VPPERM, 0), - X86_INTRINSIC_DATA(xop_vprotb, INTR_TYPE_2OP, X86ISD::VPROT, 0), - X86_INTRINSIC_DATA(xop_vprotbi, INTR_TYPE_2OP, X86ISD::VPROTI, 0), - X86_INTRINSIC_DATA(xop_vprotd, INTR_TYPE_2OP, X86ISD::VPROT, 0), - X86_INTRINSIC_DATA(xop_vprotdi, INTR_TYPE_2OP, X86ISD::VPROTI, 0), - X86_INTRINSIC_DATA(xop_vprotq, INTR_TYPE_2OP, X86ISD::VPROT, 0), - X86_INTRINSIC_DATA(xop_vprotqi, INTR_TYPE_2OP, X86ISD::VPROTI, 0), - X86_INTRINSIC_DATA(xop_vprotw, INTR_TYPE_2OP, X86ISD::VPROT, 0), - X86_INTRINSIC_DATA(xop_vprotwi, INTR_TYPE_2OP, X86ISD::VPROTI, 0), + X86_INTRINSIC_DATA(xop_vprotb, INTR_TYPE_2OP, ISD::ROTL, 0), + X86_INTRINSIC_DATA(xop_vprotbi, INTR_TYPE_2OP, X86ISD::VROTLI, 0), + X86_INTRINSIC_DATA(xop_vprotd, INTR_TYPE_2OP, ISD::ROTL, 0), + X86_INTRINSIC_DATA(xop_vprotdi, INTR_TYPE_2OP, X86ISD::VROTLI, 0), + X86_INTRINSIC_DATA(xop_vprotq, INTR_TYPE_2OP, ISD::ROTL, 0), + X86_INTRINSIC_DATA(xop_vprotqi, INTR_TYPE_2OP, X86ISD::VROTLI, 0), + X86_INTRINSIC_DATA(xop_vprotw, INTR_TYPE_2OP, ISD::ROTL, 0), + X86_INTRINSIC_DATA(xop_vprotwi, INTR_TYPE_2OP, X86ISD::VROTLI, 0), X86_INTRINSIC_DATA(xop_vpshab, INTR_TYPE_2OP, X86ISD::VPSHA, 0), X86_INTRINSIC_DATA(xop_vpshad, INTR_TYPE_2OP, X86ISD::VPSHA, 0), X86_INTRINSIC_DATA(xop_vpshaq, INTR_TYPE_2OP, X86ISD::VPSHA, 0),