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

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 8 14:20:09 PST 2024


dwblaikie wrote:

My main concern is addressed.

Looking at the code though, I'm a little confused - one instruction, `I` is replaced with some sequence of instructions, by the looks of it - and /all/ those new instructions are given the old instruction's debug location? What are cases where the replacement is more than one instruction? Is it right to give all the new instructions the same location? I guess it's probably fine, but does feel a bit weird & not entirely consistent with the new policy we've discussed, where only the instruction that produces the final result that matches the original instruction should have the new location, I guess, maybe?

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


More information about the llvm-commits mailing list