[llvm] [DEBUGINFO] Propagate debug metadata for sext SDNode. (PR #135971)

Orlando Cazalet-Hyams via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 17 10:20:40 PDT 2025


https://github.com/OCHyams commented:

> Yes, it does. I extended test to cover zext-zext case as well. I checkd, frontend generates similar kind of IR in case of unsigned char local variable.

Thanks!

> I don't see any nit comments about test itself. Perhaps you forgot press "submit" button for review.

Oops. Probably - I've added it now.

> Actually - could this create incorrect locations, if the sddbgvalue was attached to a zext but with this change gets moved onto a sext?

Looking again at my question - the new SDNode is created with the OpOpcode type, so that's not a concern. We only go `sext (sext x) ->sext x` or  `sext (zext x) ->zext x`, never `sext (zext x) -> sext x`. Right?

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


More information about the llvm-commits mailing list