[PATCH] D53281: [SelectionDAG] Support promotion of PREFETCH operands

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 15 10:07:45 PDT 2018


craig.topper added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:1337
+  // width.
+  SDValue Op2 = GetPromotedInteger(N->getOperand(2));
+  SDValue Op3 = GetPromotedInteger(N->getOperand(3));
----------------
I think you might want ZExtPromotedInteger here. I don't think the prefetch node is defined to only look at certain bits. Since those arguments are constants, GetPromotedInteger probably appears to do the right thing since we wouldn't make up garbage to extend a constant. But zext is more explicitily correct.


https://reviews.llvm.org/D53281





More information about the llvm-commits mailing list