[llvm] [X86] Remove a redundant cast (NFC) (PR #165509)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 28 22:12:11 PDT 2025


https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/165509

ShiftAmt is already of type int.


>From 7e1078b52c82fd61514f5e2427dc52ba3afcab03 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Sun, 26 Oct 2025 23:12:14 -0700
Subject: [PATCH] [X86] Remove a redundant cast (NFC)

ShiftAmt is already of type int.
---
 llvm/lib/Target/X86/X86ISelLowering.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index 5785440a20e43..89b42da9a40f0 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -12213,7 +12213,7 @@ static int matchShuffleAsShift(MVT &ShiftVT, unsigned &Opcode,
     MVT ShiftSVT = MVT::getIntegerVT(ScalarSizeInBits * Scale);
     ShiftVT = ByteShift ? MVT::getVectorVT(MVT::i8, SizeInBits / 8)
                         : MVT::getVectorVT(ShiftSVT, Size / Scale);
-    return (int)ShiftAmt;
+    return ShiftAmt;
   };
 
   // SSE/AVX supports logical shifts up to 64-bit integers - so we can just



More information about the llvm-commits mailing list