As we perform a zext on any arguments used in the promoted tree, it doesn't matter if they're marked as signext. The only permitted user(s) in the tree which would interpret the sign bits are signed icmps. For these instructions, their promoted operands are truncated before the icmp uses them.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Obviously ignoring the attribute is correct; signext is just an ABI attribute which has no semantic effect at the IR level. But why was the code to check it added in https://reviews.llvm.org/D61381? I assume it was supposed to be some sort of profitability check.
Comment Actions
We had a bug involving SIToFP and then I got worried about the signext arg in the reproducer too, as I had just forgotten that we explicitly zext any arguments used. Adding some profitability checks are on my todo list though.