[llvm] r313531 - [ARM] Fix for indexed dot product instruction descriptions
Sjoerd Meijer via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 18 07:17:57 PDT 2017
Author: sjoerdmeijer
Date: Mon Sep 18 07:17:57 2017
New Revision: 313531
URL: http://llvm.org/viewvc/llvm-project?rev=313531&view=rev
Log:
[ARM] Fix for indexed dot product instruction descriptions
The indexed dot product instructions only accept the lower 16 D-registers as
the indexed register, but we were e.g. incorrectly accepting:
vudot.u8 d16,d16,d18[0]
Differential Revision: https://reviews.llvm.org/D37968
Modified:
llvm/trunk/lib/Target/ARM/ARMInstrNEON.td
llvm/trunk/test/MC/ARM/armv8.2a-dotprod-error.s
Modified: llvm/trunk/lib/Target/ARM/ARMInstrNEON.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrNEON.td?rev=313531&r1=313530&r2=313531&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMInstrNEON.td (original)
+++ llvm/trunk/lib/Target/ARM/ARMInstrNEON.td Mon Sep 18 07:17:57 2017
@@ -4710,7 +4710,7 @@ def VSDOTQ : N3Vnp<0b11000, 0b10, 0b1101
// Indexed dot product instructions:
class DOTI<string opc, string dt, bit Q, bit U, RegisterClass Ty> :
N3Vnp<0b11100, 0b10, 0b1101, Q, U,
- (outs Ty:$Vd), (ins Ty:$Vn, DPR:$Vm, VectorIndex32:$lane),
+ (outs Ty:$Vd), (ins Ty:$Vn, DPR_VFP2:$Vm, VectorIndex32:$lane),
N3RegFrm, IIC_VDOTPROD, opc, dt, []> {
bit lane;
let Inst{5} = lane;
Modified: llvm/trunk/test/MC/ARM/armv8.2a-dotprod-error.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/armv8.2a-dotprod-error.s?rev=313531&r1=313530&r2=313531&view=diff
==============================================================================
--- llvm/trunk/test/MC/ARM/armv8.2a-dotprod-error.s (original)
+++ llvm/trunk/test/MC/ARM/armv8.2a-dotprod-error.s Mon Sep 18 07:17:57 2017
@@ -3,12 +3,34 @@
// RUN: not llvm-mc -triple thumb -mattr=+dotprod -show-encoding < %s 2> %t
// RUN: FileCheck --check-prefix=CHECK-ERROR < %t %s
+// Only indices 0 an 1 should be accepted:
+
vudot.u8 d0, d1, d2[2]
vsdot.s8 d0, d1, d2[2]
vudot.u8 q0, q1, d4[2]
vsdot.s8 q0, q1, d4[2]
// CHECK-ERROR: error: invalid operand for instruction
+// CHECK-ERROR: vudot.u8 d0, d1, d2[2]
+// CHECK-ERROR: ^
+// CHECK-ERROR: error: invalid operand for instruction
+// CHECK-ERROR: vsdot.s8 d0, d1, d2[2]
+// CHECK-ERROR: ^
+// CHECK-ERROR: error: invalid operand for instruction
+// CHECK-ERROR: vudot.u8 q0, q1, d4[2]
+// CHECK-ERROR: ^
// CHECK-ERROR: error: invalid operand for instruction
+// CHECK-ERROR: vsdot.s8 q0, q1, d4[2]
+// CHECK-ERROR: ^
+
+// Only the lower 16 D-registers should be accepted:
+
+vudot.u8 q0, q1, d16[0]
+vsdot.s8 q0, q1, d16[0]
+
// CHECK-ERROR: error: invalid operand for instruction
+// CHECK-ERROR: vudot.u8 q0, q1, d16[0]
+// CHECK-ERROR: ^
// CHECK-ERROR: error: invalid operand for instruction
+// CHECK-ERROR: vsdot.s8 q0, q1, d16[0]
+// CHECK-ERROR: ^
More information about the llvm-commits
mailing list