[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 20 05:56:24 PDT 2024
================
@@ -1959,9 +2064,12 @@ multiclass VCMLA_ROTS<string type, string lanety, string laneqty> {
let isLaneQ = 1 in {
// vcmla{ROT}_laneq
+ // ACLE specifies that the fp16 vcmla_#ROT_laneq variant has an immedaite range of 0 <= lane <= 1.
+ // fp16 is the only variant for which these two differ.
+ // https://developer.arm.com/documentation/ihi0073/latest/
+ defvar getlanety = !if(!eq(type, "h"), lanety, laneqty);
def : SOpInst<"vcmla" # ROT # "_laneq", "...QI", type, Op<(call "vcmla" # ROT, $p0, $p1,
- (bitcast $p0, (dup_typed lanety, (call "vget_lane", (bitcast laneqty, $p2), $p3))))>>;
-
+ (bitcast $p0, (dup_typed lanety, (call "vget_lane", (bitcast getlanety, $p2), $p3))))>>;
----------------
rsandifo-arm wrote:
No, I agree that the ACLE expects an index of [2,3] to be emulated using DUP.
https://github.com/llvm/llvm-project/pull/100278
More information about the llvm-commits
mailing list