[PATCH] D28681: [AArch64] Enable Rounding Double Multiply Add/Subtract instructions on Falkor.
Ahmed Bougacha via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 13 12:41:30 PST 2017
ab added inline comments.
================
Comment at: test/CodeGen/AArch64/arm64-neon-v8.1a.ll:2
; RUN: llc < %s -verify-machineinstrs -mtriple=arm64-eabi -aarch64-neon-syntax=generic | FileCheck %s --check-prefix=CHECK-V8a
+; RUN: llc < %s -verify-machineinstrs -mtriple=arm64-eabi -mattr=+rdm -aarch64-neon-syntax=generic | FileCheck %s --check-prefix=CHECK-RDM
; RUN: llc < %s -verify-machineinstrs -mtriple=arm64-eabi -mattr=+v8.1a -aarch64-neon-syntax=generic | FileCheck %s --check-prefix=CHECK-V81a
----------------
mcrosier wrote:
> ab wrote:
> > Maybe add --check-prefix=CHECK-RDM to the v8.1a line, and remove the rdm CHECK-V81a lines?
> I'm not sure I follow, Ahmed. Are you suggesting that I not add an additional RUN line and replace
>
> ; RUN: llc < %s -verify-machineinstrs -mtriple=arm64-eabi -mattr=+v8.1a -aarch64-neon-syntax=generic | FileCheck %s --check-prefix=CHECK-V81a
>
> with
>
> ; RUN: llc < %s -verify-machineinstrs -mtriple=arm64-eabi -mattr=+rdm -aarch64-neon-syntax=generic | FileCheck %s --check-prefix=CHECK-RDM
>
> and update the CHECK-V81a directives to CHECK-RDM?
>
> I'm happy to do that, I just want to confirm that is what you were suggesting.
Oh sorry: I was thinking you'd add the RUN line:
```
; RUN: llc < %s -verify-machineinstrs -mtriple=arm64-eabi -mattr=+rdm -aarch64-neon-syntax=generic | FileCheck %s --check-prefix=CHECK-RDM
; RUN: llc < %s -verify-machineinstrs -mtriple=arm64-eabi -mattr=+v8.1a -aarch64-neon-syntax=generic | FileCheck %s --check-prefix=CHECK-V81a --check-prefix=CHECK-RDM
```
Which lets you avoid duplicating the CHECK-RDM lines; e.g., instead of:
```
%prod = call <4 x i16> @llvm.aarch64.neon.sqrdmulh.v4i16(<4 x i16> %mhs, <4 x i16> %rhs)
%retval = call <4 x i16> @llvm.aarch64.neon.sqadd.v4i16(<4 x i16> %acc, <4 x i16> %prod)
; CHECK-V8a: sqrdmulh v1.4h, v1.4h, v2.4h
+; CHECK-RDM: sqrdmlah v0.4h, v1.4h, v2.4h
; CHECK-V81a: sqrdmlah v0.4h, v1.4h, v2.4h
; CHECK-V81a-apple: sqrdmlah.4h v0, v1, v2
ret <4 x i16> %retval
```
you'd do:
```
%prod = call <4 x i16> @llvm.aarch64.neon.sqrdmulh.v4i16(<4 x i16> %mhs, <4 x i16> %rhs)
%retval = call <4 x i16> @llvm.aarch64.neon.sqadd.v4i16(<4 x i16> %acc, <4 x i16> %prod)
; CHECK-V8a: sqrdmulh v1.4h, v1.4h, v2.4h
-; CHECK-V81a: sqrdmlah v0.4h, v1.4h, v2.4h
+; CHECK-RDM: sqrdmlah v0.4h, v1.4h, v2.4h
; CHECK-V81a-apple: sqrdmlah.4h v0, v1, v2
ret <4 x i16> %retval
```
Not a big deal either way, really.
https://reviews.llvm.org/D28681
More information about the llvm-commits
mailing list