[clang] [llvm] [AMDGPU] Enable atomic optimizer for 64 bit divergent values (PR #96473)
Matt Arsenault via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 26 02:53:24 PDT 2024
================
@@ -178,6 +178,20 @@ bool AMDGPUAtomicOptimizerImpl::run(Function &F) {
return Changed;
}
+static bool shouldOptimize(Type *Ty) {
+ switch (Ty->getTypeID()) {
+ case Type::FloatTyID:
+ case Type::DoubleTyID:
+ return true;
+ case Type::IntegerTyID: {
+ if (Ty->getIntegerBitWidth() == 32 || Ty->getIntegerBitWidth() == 64)
+ return true;
+ }
----------------
arsenm wrote:
Don't forget pointers
https://github.com/llvm/llvm-project/pull/96473
More information about the cfe-commits
mailing list