[PATCH] D72269: [ARM,MVE] Generate the right instruction for vmaxnmq_m_f16.
Simon Tatham via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 6 07:01:34 PST 2020
simon_tatham created this revision.
simon_tatham added reviewers: dmgreen, miyuki, MarkMurrayARM.
Herald added subscribers: llvm-commits, hiraditya, kristof.beyls.
Herald added a project: LLVM.
Due to a copy-paste error in the isel patterns, the predicated version
of this intrinsic was expanding to the `VMAXNMT.F32` instruction
instead of `VMAXNMT.F16`. Similarly for vminnm.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D72269
Files:
llvm/lib/Target/ARM/ARMInstrMVE.td
llvm/test/CodeGen/Thumb2/mve-intrinsics/vmaxnmq.ll
llvm/test/CodeGen/Thumb2/mve-intrinsics/vminnmq.ll
Index: llvm/test/CodeGen/Thumb2/mve-intrinsics/vminnmq.ll
===================================================================
--- llvm/test/CodeGen/Thumb2/mve-intrinsics/vminnmq.ll
+++ llvm/test/CodeGen/Thumb2/mve-intrinsics/vminnmq.ll
@@ -30,7 +30,7 @@
; CHECK: @ %bb.0: @ %entry
; CHECK-NEXT: vmsr p0, r0
; CHECK-NEXT: vpst
-; CHECK-NEXT: vminnmt.f32 q0, q1, q2
+; CHECK-NEXT: vminnmt.f16 q0, q1, q2
; CHECK-NEXT: bx lr
entry:
%0 = zext i16 %p to i32
@@ -66,7 +66,7 @@
; CHECK: @ %bb.0: @ %entry
; CHECK-NEXT: vmsr p0, r0
; CHECK-NEXT: vpst
-; CHECK-NEXT: vminnmt.f32 q0, q0, q1
+; CHECK-NEXT: vminnmt.f16 q0, q0, q1
; CHECK-NEXT: bx lr
entry:
%0 = zext i16 %p to i32
Index: llvm/test/CodeGen/Thumb2/mve-intrinsics/vmaxnmq.ll
===================================================================
--- llvm/test/CodeGen/Thumb2/mve-intrinsics/vmaxnmq.ll
+++ llvm/test/CodeGen/Thumb2/mve-intrinsics/vmaxnmq.ll
@@ -30,7 +30,7 @@
; CHECK: @ %bb.0: @ %entry
; CHECK-NEXT: vmsr p0, r0
; CHECK-NEXT: vpst
-; CHECK-NEXT: vmaxnmt.f32 q0, q1, q2
+; CHECK-NEXT: vmaxnmt.f16 q0, q1, q2
; CHECK-NEXT: bx lr
entry:
%0 = zext i16 %p to i32
@@ -66,7 +66,7 @@
; CHECK: @ %bb.0: @ %entry
; CHECK-NEXT: vmsr p0, r0
; CHECK-NEXT: vpst
-; CHECK-NEXT: vmaxnmt.f32 q0, q0, q1
+; CHECK-NEXT: vmaxnmt.f16 q0, q0, q1
; CHECK-NEXT: bx lr
entry:
%0 = zext i16 %p to i32
Index: llvm/lib/Target/ARM/ARMInstrMVE.td
===================================================================
--- llvm/lib/Target/ARM/ARMInstrMVE.td
+++ llvm/lib/Target/ARM/ARMInstrMVE.td
@@ -1097,7 +1097,7 @@
(v4f32 MQPR:$inactive)))>;
def : Pat<(v8f16 (int_arm_mve_max_predicated (v8f16 MQPR:$val1), (v8f16 MQPR:$val2),
(v8i1 VCCR:$mask), (v8f16 MQPR:$inactive))),
- (v8f16 (MVE_VMAXNMf32 (v8f16 MQPR:$val1), (v8f16 MQPR:$val2),
+ (v8f16 (MVE_VMAXNMf16 (v8f16 MQPR:$val1), (v8f16 MQPR:$val2),
ARMVCCThen, (v8i1 VCCR:$mask),
(v8f16 MQPR:$inactive)))>;
}
@@ -1117,7 +1117,7 @@
(v4f32 MQPR:$inactive)))>;
def : Pat<(v8f16 (int_arm_mve_min_predicated (v8f16 MQPR:$val1), (v8f16 MQPR:$val2),
(v8i1 VCCR:$mask), (v8f16 MQPR:$inactive))),
- (v8f16 (MVE_VMINNMf32 (v8f16 MQPR:$val1), (v8f16 MQPR:$val2),
+ (v8f16 (MVE_VMINNMf16 (v8f16 MQPR:$val1), (v8f16 MQPR:$val2),
ARMVCCThen, (v8i1 VCCR:$mask),
(v8f16 MQPR:$inactive)))>;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72269.236357.patch
Type: text/x-patch
Size: 2646 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200106/c010cc38/attachment-0001.bin>
More information about the llvm-commits
mailing list