This repository was archived by the owner on Apr 23, 2020. It is now read-only.
Commit 703b827
committed
[X86][SSE] Canonicalize OR(AND(X,C),AND(Y,~C)) -> OR(AND(X,C),ANDNP(C,Y))
For constant bit select patterns, replace one AND with a ANDNP, allowing us to reuse the constant mask. Only do this if the mask has multiple uses (to avoid losing load folding) or if we have XOP as its VPCMOV can handle most folding commutations.
This also requires computeKnownBitsForTargetNode support for X86ISD::ANDNP and X86ISD::FOR to prevent regressions in fabs/fcopysign patterns.
Differential Revision: https://reviews.llvm.org/D55935
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351819 91177308-0d34-0410-b5e6-96231b3b80d81 parent cf74016 commit 703b827
File tree
16 files changed
+1012
-969
lines changed- lib/Target/X86
- test/CodeGen/X86
16 files changed
+1012
-969
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30233 | 30233 | | |
30234 | 30234 | | |
30235 | 30235 | | |
| 30236 | + | |
| 30237 | + | |
| 30238 | + | |
| 30239 | + | |
| 30240 | + | |
| 30241 | + | |
| 30242 | + | |
| 30243 | + | |
| 30244 | + | |
| 30245 | + | |
| 30246 | + | |
| 30247 | + | |
| 30248 | + | |
| 30249 | + | |
| 30250 | + | |
| 30251 | + | |
| 30252 | + | |
| 30253 | + | |
| 30254 | + | |
| 30255 | + | |
| 30256 | + | |
30236 | 30257 | | |
30237 | 30258 | | |
30238 | 30259 | | |
| |||
36519 | 36540 | | |
36520 | 36541 | | |
36521 | 36542 | | |
| 36543 | + | |
| 36544 | + | |
| 36545 | + | |
| 36546 | + | |
| 36547 | + | |
| 36548 | + | |
| 36549 | + | |
| 36550 | + | |
| 36551 | + | |
| 36552 | + | |
| 36553 | + | |
| 36554 | + | |
| 36555 | + | |
| 36556 | + | |
| 36557 | + | |
| 36558 | + | |
| 36559 | + | |
| 36560 | + | |
| 36561 | + | |
| 36562 | + | |
| 36563 | + | |
| 36564 | + | |
| 36565 | + | |
| 36566 | + | |
| 36567 | + | |
| 36568 | + | |
| 36569 | + | |
| 36570 | + | |
| 36571 | + | |
| 36572 | + | |
| 36573 | + | |
| 36574 | + | |
| 36575 | + | |
| 36576 | + | |
| 36577 | + | |
| 36578 | + | |
| 36579 | + | |
| 36580 | + | |
| 36581 | + | |
| 36582 | + | |
| 36583 | + | |
| 36584 | + | |
| 36585 | + | |
| 36586 | + | |
| 36587 | + | |
| 36588 | + | |
36522 | 36589 | | |
36523 | 36590 | | |
36524 | 36591 | | |
| |||
36781 | 36848 | | |
36782 | 36849 | | |
36783 | 36850 | | |
| 36851 | + | |
| 36852 | + | |
| 36853 | + | |
36784 | 36854 | | |
36785 | 36855 | | |
36786 | 36856 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
69 | 69 | | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
76 | 75 | | |
77 | 76 | | |
78 | 77 | | |
| |||
0 commit comments