[PATCH] D72492: GlobalISel: Implement lower for G_BITCAST
Amara Emerson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 10 10:50:40 PST 2020
aemerson added a comment.
In D72492#1814675 <https://reviews.llvm.org/D72492#1814675>, @arsenm wrote:
> In D72492#1814575 <https://reviews.llvm.org/D72492#1814575>, @arsenm wrote:
>
> > In D72492#1814528 <https://reviews.llvm.org/D72492#1814528>, @aemerson wrote:
> >
> > > On AArch64 we also use bitcast to convert from <n x p0> to <n x s64> types.
> >
> >
> > I thought that was illegal. It’s not legal in IR
>
>
> I think this is a verifier bug. You're not allowed to bitcast between scalar pointers and scalars, so allowing it for vectors doesn't make much sense. I think allowing this is potentially problematic for non-integral pointers since it makes it easy to accidentally launder away the pointerness
We don't have an alternative way to easily convert between them though. Unless G_PTRTOINT is also allowed to take vectors of pointers.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72492/new/
https://reviews.llvm.org/D72492
More information about the llvm-commits
mailing list