[PATCH] D94437: [AArch64][GlobalISel] Add support for FCONSTANT of FP128 type

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 11 11:16:16 PST 2021


arsenm added inline comments.


================
Comment at: llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp:2318-2319
       // can be sure tablegen works correctly and isn't rescued by this code.
-      if (I.getOperand(1).getFPImm()->getValueAPF().isExactlyValue(0.0))
+      // 0.0 is not covered by tablegen for FP128. So we will handle this 
+      // scenario in the code here.
+      if (DefSize != 128 && 
----------------
Why not just fix this?


================
Comment at: llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp:2321
+      if (DefSize != 128 && 
+          I.getOperand(1).getFPImm()->getValueAPF().isExactlyValue(0.0))
         return false;
----------------
You can do isExactlyValue directly on getFPImm


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94437/new/

https://reviews.llvm.org/D94437



More information about the llvm-commits mailing list