[PATCH] D155051: [AMDGPU] Add sanity check that fixes bad shift operation in AMD backend
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 15 09:52:39 PDT 2023
arsenm added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp:877
+
unsigned AllowedBitsForMin = llvm::countr_zero(MaxMask);
if ((1u << AllowedBitsForMin) <= MinMask)
----------------
First I'd say countr_zero is just broken if this is UB.
Also needs testcase
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155051/new/
https://reviews.llvm.org/D155051
More information about the llvm-commits
mailing list