[PATCH] D72814: [AArch64][GlobalISel] Change G_FCONSTANTs feeding into stores into G_CONSTANTS

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 15 17:29:30 PST 2020


arsenm added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64PreLegalizerCombiner.cpp:50
+  const APFloat &ImmValAPF = MI.getOperand(1).getFPImm()->getValueAPF();
+  uint64_t NewImm = ImmValAPF.bitcastToAPInt().getZExtValue();
+  MIB.buildConstant(MI.getOperand(0).getReg(), NewImm);
----------------
There's no reason to go through getZExtValue, buildConstant accepts the APInt directly


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

https://reviews.llvm.org/D72814





More information about the llvm-commits mailing list