[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:48:41 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:
Why need `(unsigned)` here? If the `ISD::XXX` is not a unsigned value, I think we would have more warn/error when comparing with `Opc`.
https://github.com/llvm/llvm-project/pull/112812
More information about the llvm-commits
mailing list