[PATCH] D123663: [PPC][CodeGen][NFC] Use ArrayRef in TargetLowering functions

LiqinWeng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 13 03:32:32 PDT 2022


Miss_Grape added inline comments.


================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:197
     setLoadExtAction(ISD::EXTLOAD, MVT::f64, MVT::f16, Expand);
-    setOperationAction(ISD::FP16_TO_FP, MVT::f64, Expand);
-    setOperationAction(ISD::FP_TO_FP16, MVT::f64, Expand);
+    setOperationAction({ISD::FP16_TO_FP, ISD::FP_TO_FP16}, {MVT::f64, MVT::f32},
+                       Expand);
----------------
lkail wrote:
> I doubt if it really eases developer to read the code. This API implies Cartesian product, but some might think it as one-to-one mapping at first glance due to the same length.
> Also, if we have new operation but only applied to `MVT::f64`, we still need another statement to specify it.
Do you mean to change only one semantic, operate Ops alone or operate VTs alones??
Pleas see this : https://reviews.llvm.org/D123467


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D123663



More information about the llvm-commits mailing list