[llvm] [DebugInfo][InstCombine] When replacing bswap idiom, add DebugLoc to new insts (PR #114231)

Stephen Tozer via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 4 06:08:25 PST 2024


SLTozer wrote:

> FWIW, I think that trying to use a merged location rather than the location of the last instruction in InstCombine would be completely impractical.

I agree, notably with this patch we will use merged locations for all the new instructions generated _except_ for the final instruction that we RAUW the original instruction with, which will take the original instruction's location as always - so this patch will only apply to the new instructions generated in the course of creating the replacement instruction.

https://github.com/llvm/llvm-project/pull/114231


More information about the llvm-commits mailing list