Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Should the change description say "propagate constants for llvm.amdgcn.wave.reduce.umin/umax"? That seems more informative.
Moved const fold impl from /lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp to
lib/Analysis/ConstantFolding.cpp
llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.umax.ll | ||
---|---|---|
138 ↗ | (On Diff #543881) | llc does not run IR optimization passes. Use opt for that. |
llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.umax.ll | ||
---|---|---|
138 ↗ | (On Diff #543881) | 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. |
llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.umax.ll | ||
---|---|---|
138 ↗ | (On Diff #543881) | 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? |
llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.umax.ll | ||
---|---|---|
138 ↗ | (On Diff #543881) | Agree. Sorry, I overlooked. The optimization is applied in this case also. |
llvm/test/Transforms/InstSimplify/ConstProp/AMDGPU/wave.reduce.ll | ||
---|---|---|
64 ↗ | (On Diff #544173) | This usecase is not being optimized (const-fold). |
This should go in lib/Analysis/ConstantFolding.cpp instead.