Skip to content

Commit

Permalink
[ARM][ISel] Fix crash of ISD::FMINNUM/FMAXNUM (llvm#65849)
Browse files Browse the repository at this point in the history
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 llvm#65820
  • Loading branch information
vfdff authored and kstoimenov committed Sep 14, 2023
1 parent fea46c2 commit b4952d8
Show file tree
Hide file tree
Showing 2 changed files with 234 additions and 250 deletions.
16 changes: 8 additions & 8 deletions llvm/lib/Target/ARM/ARMInstrNEON.td
Original file line number Diff line number Diff line change
Expand Up @@ -5711,19 +5711,19 @@ let PostEncoderMethod = "NEONThumb2V8PostEncoder", DecoderNamespace = "v8NEON" i
def NEON_VMAXNMNDf : N3VDIntnp<0b00110, 0b00, 0b1111, 0, 1,
N3RegFrm, NoItinerary, "vmaxnm", "f32",
v2f32, v2f32, fmaxnum, 1>,
Requires<[HasV8, HasNEON]>;
Requires<[HasFPARMv8, HasNEON]>;
def NEON_VMAXNMNQf : N3VQIntnp<0b00110, 0b00, 0b1111, 1, 1,
N3RegFrm, NoItinerary, "vmaxnm", "f32",
v4f32, v4f32, fmaxnum, 1>,
Requires<[HasV8, HasNEON]>;
Requires<[HasFPARMv8, HasNEON]>;
def NEON_VMAXNMNDh : N3VDIntnp<0b00110, 0b01, 0b1111, 0, 1,
N3RegFrm, NoItinerary, "vmaxnm", "f16",
v4f16, v4f16, fmaxnum, 1>,
Requires<[HasV8, HasNEON, HasFullFP16]>;
Requires<[HasFPARMv8, HasNEON, HasFullFP16]>;
def NEON_VMAXNMNQh : N3VQIntnp<0b00110, 0b01, 0b1111, 1, 1,
N3RegFrm, NoItinerary, "vmaxnm", "f16",
v8f16, v8f16, fmaxnum, 1>,
Requires<[HasV8, HasNEON, HasFullFP16]>;
Requires<[HasFPARMv8, HasNEON, HasFullFP16]>;
}

// VMIN : Vector Minimum
Expand Down Expand Up @@ -5753,19 +5753,19 @@ let PostEncoderMethod = "NEONThumb2V8PostEncoder", DecoderNamespace = "v8NEON" i
def NEON_VMINNMNDf : N3VDIntnp<0b00110, 0b10, 0b1111, 0, 1,
N3RegFrm, NoItinerary, "vminnm", "f32",
v2f32, v2f32, fminnum, 1>,
Requires<[HasV8, HasNEON]>;
Requires<[HasFPARMv8, HasNEON]>;
def NEON_VMINNMNQf : N3VQIntnp<0b00110, 0b10, 0b1111, 1, 1,
N3RegFrm, NoItinerary, "vminnm", "f32",
v4f32, v4f32, fminnum, 1>,
Requires<[HasV8, HasNEON]>;
Requires<[HasFPARMv8, HasNEON]>;
def NEON_VMINNMNDh : N3VDIntnp<0b00110, 0b11, 0b1111, 0, 1,
N3RegFrm, NoItinerary, "vminnm", "f16",
v4f16, v4f16, fminnum, 1>,
Requires<[HasV8, HasNEON, HasFullFP16]>;
Requires<[HasFPARMv8, HasNEON, HasFullFP16]>;
def NEON_VMINNMNQh : N3VQIntnp<0b00110, 0b11, 0b1111, 1, 1,
N3RegFrm, NoItinerary, "vminnm", "f16",
v8f16, v8f16, fminnum, 1>,
Requires<[HasV8, HasNEON, HasFullFP16]>;
Requires<[HasFPARMv8, HasNEON, HasFullFP16]>;
}

// Vector Pairwise Operations.
Expand Down
Loading

0 comments on commit b4952d8

Please sign in to comment.