[PATCH] D156077: [AMDGPU] Propagate constants for llvm.amdgcn.wave.reduce.umin/umax
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 25 06:59:07 PDT 2023
arsenm added inline comments.
================
Comment at: llvm/lib/Analysis/ConstantFolding.cpp:2851
+ }
+ // propagate constant int value
+ if (auto *CI = dyn_cast<ConstantInt>(Src)) {
----------------
It doesn't need to be a literal int isa<Constant> should cover every case
================
Comment at: llvm/test/Transforms/InstSimplify/ConstProp/AMDGPU/wave.reduce.ll:33
+}
+
+; --------------------------------------------------------------------
----------------
Also try something exotic, like ptrtoint of a global declaration
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156077/new/
https://reviews.llvm.org/D156077
More information about the llvm-commits
mailing list