diff options
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/AArch64/AArch64InstrInfo.td | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64InstrInfo.td b/llvm/lib/Target/AArch64/AArch64InstrInfo.td index d9734eb3a12..dde05404365 100644 --- a/llvm/lib/Target/AArch64/AArch64InstrInfo.td +++ b/llvm/lib/Target/AArch64/AArch64InstrInfo.td @@ -3083,6 +3083,14 @@ defm : FPToIntegerPats<fp_to_uint, ftrunc, "FCVTZU">; defm : FPToIntegerPats<fp_to_sint, fround, "FCVTAS">; defm : FPToIntegerPats<fp_to_uint, fround, "FCVTAU">; +let Predicates = [HasFullFP16] in { + def : Pat<(i32 (lround f16:$Rn)), + (!cast<Instruction>(FCVTASUWHr) f16:$Rn)>; + def : Pat<(i64 (lround f16:$Rn)), + (!cast<Instruction>(FCVTASUXHr) f16:$Rn)>; + def : Pat<(i64 (llround f16:$Rn)), + (!cast<Instruction>(FCVTASUXHr) f16:$Rn)>; +} def : Pat<(i32 (lround f32:$Rn)), (!cast<Instruction>(FCVTASUWSr) f32:$Rn)>; def : Pat<(i32 (lround f64:$Rn)), |