[PATCH] D156077: [AMDGPU] Propagate constants for llvm.amdgcn.wave.reduce.umin/umax

Pravin Jagtap via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 25 03:05:05 PDT 2023


pravinjagtap added inline comments.


================
Comment at: llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.umax.ll:138
 
 define amdgpu_kernel void @const_value(ptr addrspace(1) %out) {
 ; GFX8DAGISEL-LABEL: const_value:
----------------
foad wrote:
> pravinjagtap wrote:
> > foad wrote:
> > > pravinjagtap wrote:
> > > > Hello @foad, I am not sure why `const fold` optimization is not being applied here in llc.
> > > `llc` does not run IR optimization passes. Use `opt` for that.
> > If you notice, `poison_value` test point is being modified after `early-cse` pass during `llc` invocation in this test because of the current change in ConstantFolding.cpp. I was expecting same for `const_value` test point here.
> Why do you think "const fold optimization is not being applied here"? Looking at the ISA, it just stores a constant value. What did you expect to see?
Agree. Sorry, I overlooked. The optimization is applied in this case also.


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