[llvm] [X86] LowerShift - track the number and location of constant shift elements. (PR #120270)

Phoebe Wang via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 18 02:04:59 PST 2024


================
@@ -30057,6 +30057,23 @@ static SDValue LowerShift(SDValue Op, const X86Subtarget &Subtarget,
     return DAG.getVectorShuffle(VT, dl, R0, R1, {0, 3});
   }
 
+  // Build a map of inrange constant amounts with element mask where they occur.
+  std::map<unsigned, APInt> UniqueCstAmt;
----------------
phoebewang wrote:

Is bettter to use `DenseMap`?

https://github.com/llvm/llvm-project/pull/120270


More information about the llvm-commits mailing list