[llvm] [AMDGPU] Fix copy-paste in hasNon16BitAccesses OpIs16Bit check (PR #203499)

Arseniy Obolenskiy via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 12 03:48:08 PDT 2026


https://github.com/aobolensk created https://github.com/llvm/llvm-project/pull/203499

OpIs16Bit tested TempOtherOp width instead of TempOp, mismatching symmetric OtherOpIs16Bit clause

No observed miscompiles or direct issues to due to that so far

>From d6084b2db232fadc8526326c7da40753eafb4313 Mon Sep 17 00:00:00 2001
From: Arseniy Obolenskiy <arseniy.obolenskiy at amd.com>
Date: Fri, 12 Jun 2026 12:43:26 +0200
Subject: [PATCH] [AMDGPU] Fix copy-paste in hasNon16BitAccesses OpIs16Bit
 check

OpIs16Bit tested TempOtherOp width instead of TempOp, mismatching symmetric OtherOpIs16Bit clause

No observed miscompiles or direct issues to due to that so far
---
 llvm/lib/Target/AMDGPU/SIISelLowering.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/lib/Target/AMDGPU/SIISelLowering.cpp b/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
index eb3b869990cdd..30950f8f5d9e5 100644
--- a/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+++ b/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
@@ -15070,7 +15070,7 @@ static bool hasNon16BitAccesses(uint64_t PermMask, SDValue &Op,
   auto TempOtherOp = peekThroughBitcasts(OtherOp);
 
   auto OpIs16Bit =
-      TempOtherOp.getValueSizeInBits() == 16 || isExtendedFrom16Bits(TempOp);
+      TempOp.getValueSizeInBits() == 16 || isExtendedFrom16Bits(TempOp);
   if (!OpIs16Bit)
     return true;
 



More information about the llvm-commits mailing list