[PATCH] D49837: [SelectionDAG] Handle unary SelectPatternFlavor for ABS case in SelectionDAGBuilder::visitSelect.

Ivan Kulagin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 30 12:44:45 PDT 2018


ikulagin added inline comments.


================
Comment at: lib/Target/ARM/ARMISelLowering.cpp:1210
+/*    for (auto &VT : {MVT::i8, MVT::i64})
+    setOperationAction(ISD::ABS, VT, Legal);*/
+    setTargetDAGCombine(ISD::ABS);
----------------
RKSimon wrote:
> Don't include commented out code
Sorry for that, I did not notice.


================
Comment at: lib/Target/X86/X86ISelLowering.cpp:26030
+    Results.push_back(Lo);
+    Results.push_back(Hi);
+    return;
----------------
RKSimon wrote:
> Seems a shame this (and the ARM) code can't be put into the legalizers
Could you explain in more detail, or give some advice, please?


================
Comment at: test/CodeGen/Thumb/iabs.ll:76
+  ret i64 %abs
+}
----------------
RKSimon wrote:
> Add these new tests to trunk now so the patch shows the codegen diff
It is already exist, I have created diff early --  D52138.


Repository:
  rL LLVM

https://reviews.llvm.org/D49837





More information about the llvm-commits mailing list