[llvm] [X86] Use GFNI for vXi8 shifts/rotates (PR #89115)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 24 02:18:28 PDT 2024
================
@@ -28988,6 +28988,29 @@ SDValue X86TargetLowering::LowerWin64_INT128_TO_FP(SDValue Op,
return IsStrict ? DAG.getMergeValues({Result, Chain}, dl) : Result;
}
+// Generate a GFNI gf2p8affine bitmask for vXi8 bitreverse/shift/rotate.
+uint64_t getGFNICtrlImm(unsigned Opcode, unsigned Amt = 0) {
+ assert((Amt < 8) && "Shift/Rotation amount out of range");
+ switch (Opcode) {
+ case ISD::BITREVERSE:
----------------
RKSimon wrote:
We use the llvm_unreachable instead to stop MSVC complaining :|
https://github.com/llvm/llvm-project/pull/89115
More information about the llvm-commits
mailing list