[PATCH] D68982: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 15 08:38:10 PDT 2019


spatel added reviewers: efriedma, hfinkel, mehdi_amini, lebedev.ri, craig.topper.
spatel added a comment.

I understand the direction, and I think there's general agreement on it (adding some more potential reviewers based on the bug report and llvm-dev thread), but:

1. Add the tests in the patch description to a file in test/CodeGen/MSP430 as an NFC commit *before* applying this patch. Generate baseline test assertions for current asm using utils/update_llc_test_checks.py.
2. Split this patch up. In the 1st step, we can add the TLI hook and 1-2 usages of that hook that show a test diff for MSP430. Ideally, we can add small tests for each proposed usage of the TLI hook.



================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:9496
+    const TargetLowering &TLI = DAG.getTargetLoweringInfo();
+    if ( ShCt <= TLI.getShiftAmountThreshold(VT)) {
+      SDValue NotX = DAG.getNOT(DL, X, VT);
----------------
Formatting: extra space after parenthesis here.
Several places below have the same problem.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D68982





More information about the llvm-commits mailing list