Commit 9760b28
[DAGCombiner][X86] Don't peek through ANDs on the shift amount in matchRotateSub when called from MatchFunnelPosNeg.
Peeking through AND is only valid if the input to both shifts is
the same. If the inputs are different, then the original pattern
ORs the two values when the masked shift amount is 0. This is ok
if the values are the same since the OR would be a NOP which is
why its ok for rotate.
Fixes PR49365 and reverts PR34641
Differential Revision: https://reviews.llvm.org/D97637
(cherry picked from commit 5de09ef)1 parent 3442169 commit 9760b28
File tree
2 files changed
+40
-19
lines changed- llvm
- lib/CodeGen/SelectionDAG
- test/CodeGen/X86
2 files changed
+40
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6517 | 6517 | | |
6518 | 6518 | | |
6519 | 6519 | | |
| 6520 | + | |
| 6521 | + | |
| 6522 | + | |
6520 | 6523 | | |
6521 | | - | |
| 6524 | + | |
6522 | 6525 | | |
6523 | 6526 | | |
6524 | 6527 | | |
| |||
6550 | 6553 | | |
6551 | 6554 | | |
6552 | 6555 | | |
| 6556 | + | |
| 6557 | + | |
| 6558 | + | |
6553 | 6559 | | |
6554 | | - | |
| 6560 | + | |
6555 | 6561 | | |
6556 | 6562 | | |
6557 | 6563 | | |
| |||
6641 | 6647 | | |
6642 | 6648 | | |
6643 | 6649 | | |
6644 | | - | |
| 6650 | + | |
| 6651 | + | |
6645 | 6652 | | |
6646 | 6653 | | |
6647 | 6654 | | |
| |||
6670 | 6677 | | |
6671 | 6678 | | |
6672 | 6679 | | |
6673 | | - | |
| 6680 | + | |
6674 | 6681 | | |
6675 | 6682 | | |
6676 | 6683 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
480 | 480 | | |
481 | 481 | | |
482 | 482 | | |
483 | | - | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
484 | 486 | | |
485 | | - | |
486 | | - | |
| 487 | + | |
| 488 | + | |
487 | 489 | | |
| 490 | + | |
488 | 491 | | |
489 | 492 | | |
490 | | - | |
491 | | - | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
492 | 497 | | |
493 | 498 | | |
494 | | - | |
| 499 | + | |
495 | 500 | | |
496 | 501 | | |
497 | | - | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
498 | 505 | | |
499 | | - | |
| 506 | + | |
| 507 | + | |
500 | 508 | | |
501 | 509 | | |
502 | 510 | | |
| |||
507 | 515 | | |
508 | 516 | | |
509 | 517 | | |
510 | | - | |
511 | | - | |
| 518 | + | |
| 519 | + | |
512 | 520 | | |
| 521 | + | |
513 | 522 | | |
514 | 523 | | |
515 | | - | |
516 | | - | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
517 | 528 | | |
518 | 529 | | |
519 | | - | |
| 530 | + | |
520 | 531 | | |
521 | 532 | | |
522 | | - | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
523 | 536 | | |
524 | | - | |
| 537 | + | |
| 538 | + | |
525 | 539 | | |
526 | 540 | | |
527 | 541 | | |
| |||
0 commit comments