Skip to content

Commit 8c19ee2

Browse files
committed
Improve fp16 pattern readability
1 parent 6bcd7a2 commit 8c19ee2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

llvm/lib/Target/AArch64/AArch64InstrInfo.td

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6098,13 +6098,13 @@ def : Pat<(f64 (uint_to_fp (i64 (vector_extract (v2i64 FPR128:$Rn), (i64 0))))),
60986098
// Actual extraction result is then an in-reg sign-extension of lower 16-bits.
60996099
let Predicates = [HasNEONandIsStreamingSafe, HasFullFP16] in {
61006100
def : Pat<(f16 (sint_to_fp (i32 (sext_inreg (i32 (vector_extract
6101-
(v8i16 FPR128:$Rn), (i64 0))), i16)))),
6102-
(SCVTFv1i16 (f16 (EXTRACT_SUBREG (v8i16 FPR128:$Rn), hsub)))>;
6101+
(v8i16 FPR128:$Rn), (i64 0))), i16)))),
6102+
(SCVTFv1i16 (f16 (EXTRACT_SUBREG (v8i16 FPR128:$Rn), hsub)))>;
61036103

61046104
// unsigned 32-bit extracted element is truncated to 16-bits using AND
61056105
def : Pat<(f16 (uint_to_fp (i32 (and (i32 (vector_extract
6106-
(v8i16 FPR128:$Rn), (i64 0))), (i32 65535))))),
6107-
(UCVTFv1i16 (f16 (EXTRACT_SUBREG (v8i16 FPR128:$Rn), hsub)))>;
6106+
(v8i16 FPR128:$Rn), (i64 0))), (i32 65535))))),
6107+
(UCVTFv1i16 (f16 (EXTRACT_SUBREG (v8i16 FPR128:$Rn), hsub)))>;
61086108
}
61096109

61106110
// If an integer is about to be converted to a floating point value,

0 commit comments

Comments
 (0)