[PATCH] D80483: [X86] Teach combineTruncatedArithmetic to push truncate through subtracts where only one of the inputs is free to truncate.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat May 23 15:23:11 PDT 2020


craig.topper created this revision.
craig.topper added reviewers: spatel, RKSimon.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.

Fix combineSubToSubus to handle the new DAG to avoid a regression.

There are still regressions in test14/test15/test16. Where it
looks like were trying to set up cases we could match to
umin+trunc+subus but the handling was never finished. The
regression here isn't unique to sub. Its a lost opportunity for
taking an AND with two truncated inputs and producing a larger
AND with a single truncate. The same thing could happen with
any other node we handle in combineTruncatedArithmetic since we
are moving the truncate up the DAG.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D80483

Files:
  llvm/lib/Target/X86/X86ISelLowering.cpp
  llvm/test/CodeGen/X86/psubus.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80483.265896.patch
Type: text/x-patch
Size: 57575 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200523/78a5bcd4/attachment-0001.bin>


More information about the llvm-commits mailing list