[llvm] [Hexagon] Shrink __builtin_trap lowering from two words to one (PR #189210)
Brian Cain via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 1 12:57:02 PDT 2026
androm3da wrote:
Okay so this new approach takes the encoding `0x00110011` instead of zero.
* Pro: avoids any ambiguity with other zeroes in the program text space.
* Con: not quite as instantly recognizable like a zero or `0xbadc0fee` is.
Now it gets disassembled as `mult_reg_write_fail` - whatever text we put here is certainly up for debate/bikeshed, I don't know if I have any strong feelings. But I do think that the suggestion from @efriedma-quic was a good one and helps mitigate *some* of @quic-akaryaki 's concern. Well, IMO it does but I don't think Alexey will necessarily see it that way 😉
IMO the baseline behavior is good/acceptable/expected, and this is no worse.
However, Alexey and I talked a bit and he had some suggestions about perhaps replacing these with a jump to a section's compiler-synthetically-generated `__builtin_trap`. I wasn't sure at first but I think this could have a benefit of allowing us to remove `isSolo` for the `PS_crash` pseudo, which would be yet better still.
https://github.com/llvm/llvm-project/pull/189210
More information about the llvm-commits
mailing list