[PATCH] D37139: [x86] Extend the manual ISel of `add` and `sub` with both RMW memory operands and used flags to support matching immediate operands.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 25 23:25:11 PDT 2017


craig.topper added inline comments.


================
Comment at: lib/Target/X86/X86ISelDAGToDAG.cpp:1941
+       ++UI) {
+    // Only examine CopyToReg uses.
+    switch (UI->getOpcode()) {
----------------
Should we just check the uses of ResNo(1)?


================
Comment at: lib/Target/X86/X86ISelDAGToDAG.cpp:2241
+                 (MemVT != MVT::i64 || OperandV.getMinSignedBits() <= 32)) {
+        MVT ImmVT = MemVT == MVT::i64 ? MVT::i32 : MemVT.getSimpleVT();
+        if (MemVT == MVT::i64)
----------------
We don't need to truncate the immediate type/value do we?


https://reviews.llvm.org/D37139





More information about the llvm-commits mailing list