[ARM] Replace fp-only-sp and d16 with fp64 and d32.
Those two subtarget features were awkward because their semantics are
reversed: each one indicates the _lack_ of support for something in
the architecture, rather than the presence. As a consequence, you
don't get the behavior you want if you combine two sets of feature
bits.
Each SubtargetFeature for an FP architecture version now comes in four
versions, one for each combination of those options. So you can still
say (for example) '+vfp2' in a feature string and it will mean what
it's always meant, but there's a new string '+vfp2d16sp' meaning the
version without those extra options.
A lot of this change is just mechanically replacing positive checks
for the old features with negative checks for the new ones. But one
more interesting change is that I've rearranged getFPUFeatures() so
that the main FPU feature is appended to the output list *before*
rather than after the features derived from the Restriction field, so
that -fp64 and -d32 can override defaults added by the main feature.
Reviewers: dmgreen, samparker, SjoerdMeijer
Subscribers: srhines, javed.absar, eraman, kristof.beyls, hiraditya, zzheng, Petar.Avramovic, cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D60691
llvm-svn: 361845
2019-05-29 00:13:20 +08:00
|
|
|
@ RUN: not llvm-mc -triple armv8 -mattr=-fp-armv8d16sp -show-encoding < %s 2>&1 | FileCheck %s
|
2013-08-27 19:24:16 +08:00
|
|
|
|
|
|
|
vmaxnm.f32 s4, d5, q1
|
2017-12-04 21:42:22 +08:00
|
|
|
@ CHECK: error: invalid instruction
|
2013-08-27 19:24:16 +08:00
|
|
|
vmaxnm.f64.f64 s4, d5, q1
|
2017-12-04 21:42:22 +08:00
|
|
|
@ CHECK: error: invalid instruction
|
2013-08-27 19:24:16 +08:00
|
|
|
vmaxnmge.f64.f64 s4, d5, q1
|
|
|
|
@ CHECK: error: instruction 'vmaxnm' is not predicable, but condition code specified
|
|
|
|
|
|
|
|
vcvta.s32.f32 s1, s2
|
2013-09-13 21:46:57 +08:00
|
|
|
@ CHECK: error: instruction requires: FPARMv8
|
2013-08-27 19:24:16 +08:00
|
|
|
vcvtp.u32.f32 s1, d2
|
2017-10-10 20:35:09 +08:00
|
|
|
@ CHECK: error: operand must be a register in range [d0, d31]
|
2013-08-27 19:24:16 +08:00
|
|
|
vcvtp.f32.u32 d1, q2
|
2017-12-04 21:42:22 +08:00
|
|
|
@ CHECK: error: invalid instruction
|
2013-08-27 19:24:16 +08:00
|
|
|
vcvtplo.f32.u32 s1, s2
|
|
|
|
@ CHECK: error: instruction 'vcvtp' is not predicable, but condition code specified
|
|
|
|
|
|
|
|
vrinta.f64.f64 s3, d12
|
2017-12-04 21:42:22 +08:00
|
|
|
@ CHECK: error: invalid instruction
|
2013-08-27 19:24:16 +08:00
|
|
|
vrintn.f32 d3, q12
|
2017-10-03 18:26:11 +08:00
|
|
|
@ CHECK: error: invalid instruction, any one of the following would fix this:
|
2017-10-10 20:35:09 +08:00
|
|
|
@ CHECK: note: operand must be a register in range [d0, d31]
|
|
|
|
@ CHECK: note: operand must be a register in range [q0, q15]
|
2013-08-27 19:24:16 +08:00
|
|
|
vrintz.f32 d3, q12
|
2017-10-03 18:26:11 +08:00
|
|
|
@ CHECK: error: invalid instruction, any one of the following would fix this:
|
2017-10-10 20:35:09 +08:00
|
|
|
@ CHECK: note: operand must be a register in range [d0, d31]
|
|
|
|
@ CHECK: note: operand must be a register in range [q0, q15]
|
2013-08-27 19:24:16 +08:00
|
|
|
vrintmge.f32.f32 d3, d4
|
|
|
|
@ CHECK: error: instruction 'vrintm' is not predicable, but condition code specified
|
2013-09-19 19:59:01 +08:00
|
|
|
|
|
|
|
aesd.8 q0, s1
|
2017-10-10 20:35:09 +08:00
|
|
|
@ CHECK: error: operand must be a register in range [q0, q15]
|
2013-09-19 19:59:01 +08:00
|
|
|
aese.8 s0, q1
|
2017-10-10 20:35:09 +08:00
|
|
|
@ CHECK: error: operand must be a register in range [q0, q15]
|
2013-09-19 19:59:01 +08:00
|
|
|
aesimc.8 s0, q1
|
2017-10-10 20:35:09 +08:00
|
|
|
@ CHECK: error: operand must be a register in range [q0, q15]
|
2013-09-19 19:59:01 +08:00
|
|
|
aesmc.8 q0, d1
|
2017-10-10 20:35:09 +08:00
|
|
|
@ CHECK: error: operand must be a register in range [q0, q15]
|
2013-09-19 19:59:01 +08:00
|
|
|
aesdge.8 q0, q1
|
|
|
|
@ CHECK: error: instruction 'aesd' is not predicable, but condition code specified
|
|
|
|
|
|
|
|
sha1h.32 d0, q1
|
2017-10-10 20:35:09 +08:00
|
|
|
@ CHECK: error: operand must be a register in range [q0, q15]
|
2013-09-19 19:59:01 +08:00
|
|
|
sha1su1.32 q0, s1
|
2017-10-10 20:35:09 +08:00
|
|
|
@ CHECK: error: operand must be a register in range [q0, q15]
|
2013-09-19 19:59:01 +08:00
|
|
|
sha256su0.32 s0, q1
|
2017-10-10 20:35:09 +08:00
|
|
|
@ CHECK: error: operand must be a register in range [q0, q15]
|
2013-09-19 19:59:01 +08:00
|
|
|
sha1heq.32 q0, q1
|
|
|
|
@ CHECK: error: instruction 'sha1h' is not predicable, but condition code specified
|
|
|
|
|
|
|
|
sha1c.32 s0, d1, q2
|
2017-12-04 21:42:22 +08:00
|
|
|
@ CHECK: error: invalid instruction
|
2013-09-19 19:59:01 +08:00
|
|
|
sha1m.32 q0, s1, q2
|
2017-10-10 20:35:09 +08:00
|
|
|
@ CHECK: error: operand must be a register in range [q0, q15]
|
2013-09-19 19:59:01 +08:00
|
|
|
sha1p.32 s0, q1, q2
|
2017-10-10 20:35:09 +08:00
|
|
|
@ CHECK: error: operand must be a register in range [q0, q15]
|
2013-09-19 19:59:01 +08:00
|
|
|
sha1su0.32 d0, q1, q2
|
2017-10-10 20:35:09 +08:00
|
|
|
@ CHECK: error: operand must be a register in range [q0, q15]
|
2013-09-19 19:59:01 +08:00
|
|
|
sha256h.32 q0, s1, q2
|
2017-10-10 20:35:09 +08:00
|
|
|
@ CHECK: error: operand must be a register in range [q0, q15]
|
2013-09-19 19:59:01 +08:00
|
|
|
sha256h2.32 q0, q1, s2
|
2017-10-10 20:35:09 +08:00
|
|
|
@ CHECK: error: operand must be a register in range [q0, q15]
|
2013-09-19 19:59:01 +08:00
|
|
|
sha256su1.32 s0, d1, q2
|
2017-12-04 21:42:22 +08:00
|
|
|
@ CHECK: error: invalid instruction
|
2013-09-19 19:59:01 +08:00
|
|
|
sha256su1lt.32 q0, d1, q2
|
|
|
|
@ CHECK: error: instruction 'sha256su1' is not predicable, but condition code specified
|
|
|
|
|
|
|
|
vmull.p64 q0, s1, s3
|
2017-12-04 21:42:22 +08:00
|
|
|
@ CHECK: error: invalid instruction
|
2013-09-19 19:59:01 +08:00
|
|
|
vmull.p64 s1, d2, d3
|
2017-10-10 20:35:09 +08:00
|
|
|
@ CHECK: error: operand must be a register in range [q0, q15]
|
2013-09-19 19:59:01 +08:00
|
|
|
vmullge.p64 q0, d16, d17
|
|
|
|
@ CHECK: error: instruction 'vmull' is not predicable, but condition code specified
|
2017-11-21 23:34:15 +08:00
|
|
|
|
|
|
|
// These instructions are predicable in VFP but not in NEON
|
|
|
|
vrintzeq.f32 d0, d1
|
|
|
|
vrintxgt.f32 d0, d1
|
|
|
|
@ CHECK: error: invalid operand for instruction
|
|
|
|
@ CHECK: error: invalid operand for instruction
|