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.
| llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp | ||
|---|---|---|
| 1139 ↗ | (On Diff #543381) | that's true of many folds we do here, but I thought we were supposed to avoid putting target intrinsics there. We do lose out of the benefits of being a pure analysis here though |
| 1144 ↗ | (On Diff #543381) | isa<Constant> covers isa<Poison> |
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 | llc does not run IR optimization passes. Use opt for that. | |
| llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.umax.ll | ||
|---|---|---|
| 138 | 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 | 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 | Agree. Sorry, I overlooked. The optimization is applied in this case also. | |
| llvm/test/Transforms/InstSimplify/ConstProp/AMDGPU/wave.reduce.ll | ||
|---|---|---|
| 65 | This usecase is not being optimized (const-fold). | |
Don't add new include