brintos

brintos / llvm-project-archived public Read only

0
0
Text · 4.3 KiB · edbfcda Raw
108 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 62; RUN: opt -passes=gvn -S < %s | FileCheck %s3 4; GVN failed to do constant expression folding and expanded5; them unfolded in many places, producing exponentially large const6; expressions. As a result, the compilation never fisished.7; This test checks that we are folding constant expression8; PR 284189 10%2 = type { i32, i32, i32, i32, i32 }11define i32 @_Z16vector3util_mainv(i32 %x, i32 %y)  {12; CHECK-LABEL: define i32 @_Z16vector3util_mainv(13; CHECK-SAME: i32 [[X:%.*]], i32 [[Y:%.*]]) {14; CHECK-NEXT:    [[TMP1:%.*]] = alloca [[TMP0:%.*]], align 415; CHECK-NEXT:    [[TMP114:%.*]] = getelementptr inbounds [[TMP0]], ptr [[TMP1]], i64 0, i32 116; CHECK-NEXT:    store <4 x i32> <i32 234567891, i32 345678912, i32 456789123, i32 0>, ptr [[TMP114]], align 417; CHECK-NEXT:    store i32 310393545, ptr [[TMP114]], align 418; CHECK-NEXT:    store i32 -383584258, ptr [[TMP114]], align 419; CHECK-NEXT:    store i32 -57163022, ptr [[TMP114]], align 420; CHECK-NEXT:    ret i32 021;22  %tmp1 = alloca %2, align 423  %tmp114 = getelementptr inbounds %2, ptr %tmp1, i64 0, i32 124  store <4 x i32> <i32 234567891, i32 345678912, i32 456789123, i32 0>, ptr %tmp114, align 425  %tmp1683 = getelementptr inbounds %2, ptr %tmp1, i64 0, i32 126  %tmp1688 = load i32, ptr %tmp1683, align 427  %tmp1693 = shl i32 %tmp1688, 528  %tmp1694 = xor i32 %tmp1693, %tmp168829  %tmp1695 = lshr i32 %tmp1694, 730  %tmp1696 = xor i32 %tmp1695, %tmp169431  %tmp1697 = shl i32 %tmp1696, 2232  %tmp1698 = xor i32 %tmp1697, %tmp169633  %tmp1707 = shl i32 %tmp1698, 534  %tmp1708 = xor i32 %tmp1707, %tmp169835  %tmp1709 = lshr i32 %tmp1708, 736  %tmp1710 = xor i32 %tmp1709, %tmp170837  %tmp1711 = shl i32 %tmp1710, 2238  %tmp1712 = xor i32 %tmp1711, %tmp171039  %tmp1721 = shl i32 %tmp1712, 540  %tmp1722 = xor i32 %tmp1721, %tmp171241  %tmp1723 = lshr i32 %tmp1722, 742  %tmp1724 = xor i32 %tmp1723, %tmp172243  %tmp1725 = shl i32 %tmp1724, 2244  %tmp1726 = xor i32 %tmp1725, %tmp172445  %tmp1735 = shl i32 %tmp1726, 546  %tmp1736 = xor i32 %tmp1735, %tmp172647  %tmp1737 = lshr i32 %tmp1736, 748  %tmp1738 = xor i32 %tmp1737, %tmp173649  %tmp1739 = shl i32 %tmp1738, 2250  %tmp1740 = xor i32 %tmp1739, %tmp173851  store i32 %tmp1740, ptr %tmp1683, align 452  %tmp1756 = getelementptr inbounds %2, ptr %tmp1, i64 0, i32 153  %tmp1761 = load i32, ptr %tmp1756, align 454  %tmp1766 = shl i32 %tmp1761, 555  %tmp1767 = xor i32 %tmp1766, %tmp176156  %tmp1768 = lshr i32 %tmp1767, 757  %tmp1769 = xor i32 %tmp1768, %tmp176758  %tmp1770 = shl i32 %tmp1769, 2259  %tmp1771 = xor i32 %tmp1770, %tmp176960  %tmp1780 = shl i32 %tmp1771, 561  %tmp1781 = xor i32 %tmp1780, %tmp177162  %tmp1782 = lshr i32 %tmp1781, 763  %tmp1783 = xor i32 %tmp1782, %tmp178164  %tmp1784 = shl i32 %tmp1783, 2265  %tmp1785 = xor i32 %tmp1784, %tmp178366  %tmp1794 = shl i32 %tmp1785, 567  %tmp1795 = xor i32 %tmp1794, %tmp178568  %tmp1796 = lshr i32 %tmp1795, 769  %tmp1797 = xor i32 %tmp1796, %tmp179570  %tmp1798 = shl i32 %tmp1797, 2271  %tmp1799 = xor i32 %tmp1798, %tmp179772  %tmp1808 = shl i32 %tmp1799, 573  %tmp1809 = xor i32 %tmp1808, %tmp179974  %tmp1810 = lshr i32 %tmp1809, 775  %tmp1811 = xor i32 %tmp1810, %tmp180976  %tmp1812 = shl i32 %tmp1811, 2277  %tmp1813 = xor i32 %tmp1812, %tmp181178  store i32 %tmp1813, ptr %tmp1756, align 479  %tmp2645 = getelementptr inbounds %2, ptr %tmp1, i64 0, i32 180  %tmp2650 = load i32, ptr %tmp2645, align 481  %tmp2655 = shl i32 %tmp2650, 582  %tmp2656 = xor i32 %tmp2655, %tmp265083  %tmp2657 = lshr i32 %tmp2656, 784  %tmp2658 = xor i32 %tmp2657, %tmp265685  %tmp2659 = shl i32 %tmp2658, 2286  %tmp2660 = xor i32 %tmp2659, %tmp265887  %tmp2669 = shl i32 %tmp2660, 588  %tmp2670 = xor i32 %tmp2669, %tmp266089  %tmp2671 = lshr i32 %tmp2670, 790  %tmp2672 = xor i32 %tmp2671, %tmp267091  %tmp2673 = shl i32 %tmp2672, 2292  %tmp2674 = xor i32 %tmp2673, %tmp267293  %tmp2683 = shl i32 %tmp2674, 594  %tmp2684 = xor i32 %tmp2683, %tmp267495  %tmp2685 = lshr i32 %tmp2684, 796  %tmp2686 = xor i32 %tmp2685, %tmp268497  %tmp2687 = shl i32 %tmp2686, 2298  %tmp2688 = xor i32 %tmp2687, %tmp268699  %tmp2697 = shl i32 %tmp2688, 5100  %tmp2698 = xor i32 %tmp2697, %tmp2688101  %tmp2699 = lshr i32 %tmp2698, 7102  %tmp2700 = xor i32 %tmp2699, %tmp2698103  %tmp2701 = shl i32 %tmp2700, 22104  %tmp2702 = xor i32 %tmp2701, %tmp2700105  store i32 %tmp2702, ptr %tmp2645, align 4106  ret i32 0107}108