It's odd that we haven't seen the need to do this earlier.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
No objections from me, but I do wonder if there's a way to apply this more consistently to all the constant folds, not just the binops.
llvm/test/CodeGen/AMDGPU/GlobalISel/combine-urem-pow-2.mir | ||
---|---|---|
13–17 | Urgh, it's hard to see the real diff with all this "-NEXT" churn :( |
I did plan to extend this to unary ops too, should be fairly simple to do.
llvm/test/CodeGen/AMDGPU/GlobalISel/combine-urem-pow-2.mir | ||
---|---|---|
13–17 | Yeah sorry about that. I’ll update these tests and then update the patch before I commit, so the review will show the real changes. |
llvm/lib/CodeGen/GlobalISel/Utils.cpp | ||
---|---|---|
602 |
Rebase on test check regeneration.
Thanks! AMDGPU test changes look good.
llvm/test/CodeGen/AMDGPU/GlobalISel/irtranslator-getelementptr.ll | ||
---|---|---|
195–196 | BUILD_VECTOR2 and BUILD_VECTOR3 are dead now. I guess we don't do anything to clean up dead code at the end of IRTranslator? |
llvm/test/CodeGen/AMDGPU/GlobalISel/irtranslator-getelementptr.ll | ||
---|---|---|
195–196 | Correct, usually the prelegalizer combiner will handle this immediately after. |
llvm/lib/CodeGen/GlobalISel/CSEMIRBuilder.cpp | ||
---|---|---|
196–197 | This is broken because it's ignoring the DstOp. If it was requesting a specific register, you end up with an undefined vreg |
This is broken because it's ignoring the DstOp. If it was requesting a specific register, you end up with an undefined vreg