Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Does AMDGPU use this code? If so you could put something in test/CodeGen/AMDGPU/GlobalISel/legalize-add.mir.
It doesn't. I am exploring the idea of legalizing wide G_UADDO instruction using this narrowScalarAddSub legalize action(as of now it is lowered to G_ADD first) and noticed it does not handle carry generated.
llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp | ||
---|---|---|
5128–5131 ↗ | (On Diff #473186) | Changing the uses from here isn't the way the legalizer expects to work. Each instruction is legalized on its own without modifying other instructions, and using intermediate cast operations. The artifact combiner is then responsible for cleaning out illegal intermediate types |
llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp | ||
---|---|---|
5128–5131 ↗ | (On Diff #473186) | The artifact combiner is not automatically doing this. Can you direct where or how should I modify ArtifactCombiner? |
llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp | ||
---|---|---|
5128–5131 ↗ | (On Diff #473186) | Re-reading the comment, I think I misunderstood what you were trying to do. In any case, it's inappropriate to be looking through use_instructions here. You should only be modifying the original MI. If you're trying to only modify the one use in MI, you should change that operand directly |
Sorry! Accidently reopened the review with another patch I'm working on. Closing again.