[PATCH] D79416: [SVE] Fix wrong usage of getNumElements() in matchIntrinsicType
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 12 12:54:59 PDT 2020
efriedma added inline comments.
================
Comment at: llvm/test/CodeGen/AArch64/sve-bad-intrinsics.ll:13
+
+declare <vscale x 2 x i64> @llvm.aarch64.sve.add.nxv2i64(<vscale x 2 x i1>, <vscale x 2 x i64>, <vscale x 2 x i64>)
----------------
david-arm wrote:
> efriedma wrote:
> > This isn't the testcase I asked for; this isn't affected by the patch. Please take a look at my suggested testcase again.
> OK I see. So I wrote a test exactly as you described, but I'm not sure how you want to verify it is rejected? When I run "./bin/opt -verify -S < ../llvm/test/CodeGen/AArch64/sve-bad-intrinsics.ll" on your test I get:
>
> define <2 x i64> @add_i64_invalid() {
> %out = call <2 x i64> @llvm.aarch64.sve.add.v2i64(<2 x i1> zeroinitializer, <2 x i64> zeroinitializer, <2 x i64> zeroinitializer)
> ret <2 x i64> %out
> }
>
> Were you expecting to see an error? Or were you simply hoping to see a remangled name for the intrinsic? I'm just not exactly sure what I should be checking.
Sorry, I messed up the testcase. Should be something like this:
```
declare <vscale x 4 x i16> @llvm.arm.neon.vcvtfp2hf(<vscale x 4 x float>)
define <vscale x 4 x i16> @f() {
%r = call <vscale x 4 x i16> @llvm.arm.neon.vcvtfp2hf(<vscale x 4 x float> zeroinitializer)
ret <vscale x 4 x i16> %r
}
```
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79416/new/
https://reviews.llvm.org/D79416
More information about the llvm-commits
mailing list