[PATCH] D155051: [AMDGPU] Add sanity check that fixes bad shift operation in AMD backend
Konrad Kusiak via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 12 03:18:20 PDT 2023
konradkusiak97 updated this revision to Diff 539468.
konradkusiak97 added a comment.
Dropped the comment
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155051/new/
https://reviews.llvm.org/D155051
Files:
llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
Index: llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
+++ llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
@@ -871,6 +871,9 @@
unsigned MaxMask = std::max(CI.DMask, Paired.DMask);
unsigned MinMask = std::min(CI.DMask, Paired.DMask);
+ if (!MaxMask)
+ return true;
+
unsigned AllowedBitsForMin = llvm::countr_zero(MaxMask);
if ((1u << AllowedBitsForMin) <= MinMask)
return false;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155051.539468.patch
Type: text/x-patch
Size: 523 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230712/8eccb4ed/attachment.bin>
More information about the llvm-commits
mailing list