[llvm] [NFC][X86] Fix Werror=extra error due to enum (PR #112812)

Phoebe Wang via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 17 20:50:59 PDT 2024


================
@@ -29986,7 +29986,7 @@ static SDValue LowerShift(SDValue Op, const X86Subtarget &Subtarget,
           MVT::getVectorVT(NarrowScalarVT, WideNumElts), dl, AmtWideElts);
       AmtWide = DAG.getZExtOrTrunc(AmtWide, dl, WideVT);
       // Perform the actual shift.
-      unsigned LogicalOpc = Opc == ISD::SRA ? ISD::SRL : Opc;
+      unsigned LogicalOpc = Opc == ISD::SRA ? (unsigned)ISD::SRL : Opc;
----------------
phoebewang wrote:

Oh, maybe because we just use `==` and `!=` here.

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


More information about the llvm-commits mailing list