[PATCH] D71636: [AArch64][SVE][WIP] Add support for vscale constants (?)
Simon Moll via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 7 01:50:39 PST 2020
simoll added a subscriber: arsenm.
simoll added a comment.
define i32 @vscale() {
ret i32 ptrtoint (<vscale x 1 x i8>* getelementptr (<vscale x 1 x
i8>, <vscale x 1 x i8>* null, i64 1) to i32)
}
Whether this returns `vscale` or something else depends on the ptrtoint mapping of the default address space.. and `<vscale x 1 x i8>* null` might not be `i32 0` for some targets. You might get away with subtracting the integer value of `null` ;-) (.. i guess @arsenm is more familiar with the topic of address spaces and what may be assumed about them given his recent DevMtg talk).
Personally, I'd prefer to have an explicit and well-defined `vscale` constant. Having scalable vector types without `vscale`, to me, seems like stopping half way.
> My current thinking for shuffles is that we shouldn't represent the shuffle mask of shufflevector as a Constant at all.
If shuffle masks are no longer IR entities, this means ruling out computed shuffle masks in the future, which are available on some targets (X86). Whether we want computed shuffle masks at all is a different question.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71636/new/
https://reviews.llvm.org/D71636
More information about the llvm-commits
mailing list