[PATCH] D150189: GlobalISel: Refactor unary FP op constant folding

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 9 03:52:21 PDT 2023


arsenm added inline comments.


================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:1307
+  case TargetOpcode::G_FPTRUNC: {
+    bool Unused;
+    LLT DstTy = MRI.getType(MI.getOperand(0).getReg());
----------------
Pierre-vh wrote:
> If I understand correctly this is a NFC, G_FPTRUNC was handled anyway by the `V.convert` call below, but now it's explicit?
Yes, the LLT-to-semantics is only used for fptrunc now.

I'm thinking of moving FPTRUNC handling out of here entirely. It's an annoying special case complicating another patch I'm working on 


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

https://reviews.llvm.org/D150189



More information about the llvm-commits mailing list