[PATCH] Refactor LowerFABS and LowerFNEG into one function (x86) (NFC)

Andrea Di Biagio Andrea_DiBiagio at sn.scee.net
Tue Sep 2 03:13:46 PDT 2014


Hi Sanjay,

patch LGTM, thanks!

================
Comment at: lib/Target/X86/X86ISelLowering.cpp:16900-16901
@@ -16910,4 +16899,4 @@
   case ISD::LOAD:               return LowerExtendedLoad(Op, Subtarget, DAG);
-  case ISD::FABS:               return LowerFABS(Op, DAG);
-  case ISD::FNEG:               return LowerFNEG(Op, DAG);
+  case ISD::FABS:               return LowerFABSorFNEG(Op, DAG);
+  case ISD::FNEG:               return LowerFABSorFNEG(Op, DAG);
   case ISD::FCOPYSIGN:          return LowerFCOPYSIGN(Op, DAG);
----------------
Nit: I would just fall-through from case ISD::FABS to the next case (i.e. ISD::FNEG).

http://reviews.llvm.org/D5064






More information about the llvm-commits mailing list