Skip to content

Commit 347b3f1

Browse files
authored
[ARM][ISel] Fix crash of ISD::FMINNUM/FMAXNUM (#65849)
The instruction of ISD::FMINNUM/FMAXNUM should be legal if HasFPARMv8 && HasNEON. For the combination of armv7+fp-armv8, armv7 imply the feature HasNEON on, and fp-armv8 matchs the feature HasFPARMv8, so it is legal Fixes #65820
1 parent e057d89 commit 347b3f1

File tree

2 files changed

+234
-250
lines changed

2 files changed

+234
-250
lines changed

llvm/lib/Target/ARM/ARMInstrNEON.td

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5711,19 +5711,19 @@ let PostEncoderMethod = "NEONThumb2V8PostEncoder", DecoderNamespace = "v8NEON" i
57115711
def NEON_VMAXNMNDf : N3VDIntnp<0b00110, 0b00, 0b1111, 0, 1,
57125712
N3RegFrm, NoItinerary, "vmaxnm", "f32",
57135713
v2f32, v2f32, fmaxnum, 1>,
5714-
Requires<[HasV8, HasNEON]>;
5714+
Requires<[HasFPARMv8, HasNEON]>;
57155715
def NEON_VMAXNMNQf : N3VQIntnp<0b00110, 0b00, 0b1111, 1, 1,
57165716
N3RegFrm, NoItinerary, "vmaxnm", "f32",
57175717
v4f32, v4f32, fmaxnum, 1>,
5718-
Requires<[HasV8, HasNEON]>;
5718+
Requires<[HasFPARMv8, HasNEON]>;
57195719
def NEON_VMAXNMNDh : N3VDIntnp<0b00110, 0b01, 0b1111, 0, 1,
57205720
N3RegFrm, NoItinerary, "vmaxnm", "f16",
57215721
v4f16, v4f16, fmaxnum, 1>,
5722-
Requires<[HasV8, HasNEON, HasFullFP16]>;
5722+
Requires<[HasFPARMv8, HasNEON, HasFullFP16]>;
57235723
def NEON_VMAXNMNQh : N3VQIntnp<0b00110, 0b01, 0b1111, 1, 1,
57245724
N3RegFrm, NoItinerary, "vmaxnm", "f16",
57255725
v8f16, v8f16, fmaxnum, 1>,
5726-
Requires<[HasV8, HasNEON, HasFullFP16]>;
5726+
Requires<[HasFPARMv8, HasNEON, HasFullFP16]>;
57275727
}
57285728

57295729
// VMIN : Vector Minimum
@@ -5753,19 +5753,19 @@ let PostEncoderMethod = "NEONThumb2V8PostEncoder", DecoderNamespace = "v8NEON" i
57535753
def NEON_VMINNMNDf : N3VDIntnp<0b00110, 0b10, 0b1111, 0, 1,
57545754
N3RegFrm, NoItinerary, "vminnm", "f32",
57555755
v2f32, v2f32, fminnum, 1>,
5756-
Requires<[HasV8, HasNEON]>;
5756+
Requires<[HasFPARMv8, HasNEON]>;
57575757
def NEON_VMINNMNQf : N3VQIntnp<0b00110, 0b10, 0b1111, 1, 1,
57585758
N3RegFrm, NoItinerary, "vminnm", "f32",
57595759
v4f32, v4f32, fminnum, 1>,
5760-
Requires<[HasV8, HasNEON]>;
5760+
Requires<[HasFPARMv8, HasNEON]>;
57615761
def NEON_VMINNMNDh : N3VDIntnp<0b00110, 0b11, 0b1111, 0, 1,
57625762
N3RegFrm, NoItinerary, "vminnm", "f16",
57635763
v4f16, v4f16, fminnum, 1>,
5764-
Requires<[HasV8, HasNEON, HasFullFP16]>;
5764+
Requires<[HasFPARMv8, HasNEON, HasFullFP16]>;
57655765
def NEON_VMINNMNQh : N3VQIntnp<0b00110, 0b11, 0b1111, 1, 1,
57665766
N3RegFrm, NoItinerary, "vminnm", "f16",
57675767
v8f16, v8f16, fminnum, 1>,
5768-
Requires<[HasV8, HasNEON, HasFullFP16]>;
5768+
Requires<[HasFPARMv8, HasNEON, HasFullFP16]>;
57695769
}
57705770

57715771
// Vector Pairwise Operations.

0 commit comments

Comments
 (0)