[PATCH] D71636: [AArch64][SVE][WIP] Add support for vscale constants (?)
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 17 15:58:32 PST 2019
efriedma created this revision.
efriedma added reviewers: sdesmalen, huntergr, c-rhodes, cameron.mcinally, simoll, hfinkel, rkruppe, greened, rengolin, lattner.
Herald added subscribers: psnobl, hiraditya, kristof.beyls, tschuett.
Herald added a project: LLVM.
This patch allows the following IR to compile:
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)
}
to the following, which produces a value equal to the runtime value of vscale:
cntd x8
lsr x0, x8, #1
// kill: def $w0 killed $w0 killed $x0
ret
Posting this patch mainly to pose the question of whether the input IR is supposed to be valid. Some people have expressed the opinion that vscale should not be an llvm::Constant.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D71636
Files:
llvm/include/llvm/CodeGen/ISDOpcodes.h
llvm/lib/Analysis/ConstantFolding.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
llvm/lib/Target/AArch64/AArch64ISelLowering.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71636.234404.patch
Type: text/x-patch
Size: 6291 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191217/a135c202/attachment.bin>
More information about the llvm-commits
mailing list