[PATCH] D68699: [ARM] Add some sample IR MVE intrinsics with C++ isel.
Simon Tatham via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 10 09:27:15 PDT 2019
simon_tatham marked an inline comment as done.
simon_tatham added inline comments.
================
Comment at: llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:2381
+ int32_t ImmValue = cast<ConstantSDNode>(N->getOperand(3))->getZExtValue();
+ Ops.push_back(getI32Imm(ImmValue, Loc)); // immediate offset
+
----------------
dmgreen wrote:
> The immediate is in the range +-128? Do we need to diagnose here when that is out of range? Is it already diagnosed by the front end?
Yes, it is diagnosed by the front-end code in D67161 that generates it: the arguments to the corresponding clang builtins are labelled in Tablegen as `imm_mem7bit<n>`, meaning 'must be a value in the range ±127 inclusive, shifted left by n'.
I assume there's no requirement to give particularly nice error messages at ISel time if a user manually feeds in LLVM IR that gets this wrong, given the number of other kinds of LLVM IR that will give rise to incomprehensible errors about "Cannot select" or legalization...
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68699/new/
https://reviews.llvm.org/D68699
More information about the llvm-commits
mailing list