/usr/src/gcc-4.8/debian/patches/svn-updates.diff is in gcc-4.8-source 4.8.4-2ubuntu1~14.04.4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758 6759 6760 6761 6762 6763 6764 6765 6766 6767 6768 6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 6784 6785 6786 6787 6788 6789 6790 6791 6792 6793 6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 6982 6983 6984 6985 6986 6987 6988 6989 6990 6991 6992 6993 6994 6995 6996 6997 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 7043 7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113 7114 7115 7116 7117 7118 7119 7120 7121 7122 7123 7124 7125 7126 7127 7128 7129 7130 7131 7132 7133 7134 7135 7136 7137 7138 7139 7140 7141 7142 7143 7144 7145 7146 7147 7148 7149 7150 7151 7152 7153 7154 7155 7156 7157 7158 7159 7160 7161 7162 7163 7164 7165 7166 7167 7168 7169 7170 7171 7172 7173 7174 7175 7176 7177 7178 7179 7180 7181 7182 7183 7184 7185 7186 7187 7188 7189 7190 7191 7192 7193 7194 7195 7196 7197 7198 7199 7200 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210 7211 7212 7213 7214 7215 7216 7217 7218 7219 7220 7221 7222 7223 7224 7225 7226 7227 7228 7229 7230 7231 7232 7233 7234 7235 7236 7237 7238 7239 7240 7241 7242 7243 7244 7245 7246 7247 7248 7249 7250 7251 7252 7253 7254 7255 7256 7257 7258 7259 7260 7261 7262 7263 7264 7265 7266 7267 7268 7269 7270 7271 7272 7273 7274 7275 7276 7277 7278 7279 7280 7281 7282 7283 7284 7285 7286 7287 7288 7289 7290 7291 7292 7293 7294 7295 7296 7297 7298 7299 7300 7301 7302 7303 7304 7305 7306 7307 7308 7309 7310 7311 7312 7313 7314 7315 7316 7317 7318 7319 7320 7321 7322 7323 7324 7325 7326 7327 7328 7329 7330 7331 7332 7333 7334 7335 7336 7337 7338 7339 7340 7341 7342 7343 7344 7345 7346 7347 7348 7349 7350 7351 7352 7353 7354 7355 7356 7357 7358 7359 7360 7361 7362 7363 7364 7365 7366 7367 7368 7369 7370 7371 7372 7373 7374 7375 7376 7377 7378 7379 7380 7381 7382 7383 7384 7385 7386 7387 7388 7389 7390 7391 7392 7393 7394 7395 7396 7397 7398 7399 7400 7401 7402 7403 7404 7405 7406 7407 7408 7409 7410 7411 7412 7413 7414 7415 7416 7417 7418 7419 7420 7421 7422 7423 7424 7425 7426 7427 7428 7429 7430 7431 7432 7433 7434 7435 7436 7437 7438 7439 7440 7441 7442 7443 7444 7445 7446 7447 7448 7449 7450 7451 7452 7453 7454 7455 7456 7457 7458 7459 7460 7461 7462 7463 7464 7465 7466 7467 7468 7469 7470 7471 7472 7473 7474 7475 7476 7477 7478 7479 7480 7481 7482 7483 7484 7485 7486 7487 7488 7489 7490 7491 7492 7493 7494 7495 7496 7497 7498 7499 7500 7501 7502 7503 7504 7505 7506 7507 7508 7509 7510 7511 7512 7513 7514 7515 7516 7517 7518 7519 7520 7521 7522 7523 7524 7525 7526 7527 7528 7529 7530 7531 7532 7533 7534 7535 7536 7537 7538 7539 7540 7541 7542 7543 7544 7545 7546 7547 7548 7549 7550 7551 7552 7553 7554 7555 7556 7557 7558 7559 7560 7561 7562 7563 7564 7565 7566 7567 7568 7569 7570 7571 7572 7573 7574 7575 7576 7577 7578 7579 7580 7581 7582 7583 7584 7585 7586 7587 7588 7589 7590 7591 7592 7593 7594 7595 7596 7597 7598 7599 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 7610 7611 7612 7613 7614 7615 7616 7617 7618 7619 7620 7621 7622 7623 7624 7625 7626 7627 7628 7629 7630 7631 7632 7633 7634 7635 7636 7637 7638 7639 7640 7641 7642 7643 7644 7645 7646 7647 7648 7649 7650 7651 7652 7653 7654 7655 7656 7657 7658 7659 7660 7661 7662 7663 7664 7665 7666 7667 7668 7669 7670 7671 7672 7673 7674 7675 7676 7677 7678 7679 7680 7681 7682 7683 7684 7685 7686 7687 7688 7689 7690 7691 7692 7693 7694 7695 7696 7697 7698 7699 7700 7701 7702 7703 7704 7705 7706 7707 7708 7709 7710 7711 7712 7713 7714 7715 7716 7717 7718 7719 7720 7721 7722 7723 7724 7725 7726 7727 7728 7729 7730 7731 7732 7733 7734 7735 7736 7737 7738 7739 7740 7741 7742 7743 7744 7745 7746 7747 7748 7749 7750 7751 7752 7753 7754 7755 7756 7757 7758 7759 7760 7761 7762 7763 7764 7765 7766 7767 7768 7769 7770 7771 7772 7773 7774 7775 7776 7777 7778 7779 7780 7781 7782 7783 7784 7785 7786 7787 7788 7789 7790 7791 7792 7793 7794 7795 7796 7797 7798 7799 7800 7801 7802 7803 7804 7805 7806 7807 7808 7809 7810 7811 7812 7813 7814 7815 7816 7817 7818 7819 7820 7821 7822 7823 7824 7825 7826 7827 7828 7829 7830 7831 7832 7833 7834 7835 7836 7837 7838 7839 7840 7841 7842 7843 7844 7845 7846 7847 7848 7849 7850 7851 7852 7853 7854 7855 7856 7857 7858 7859 7860 7861 7862 7863 7864 7865 7866 7867 7868 7869 7870 7871 7872 7873 7874 7875 7876 7877 7878 7879 7880 7881 7882 7883 7884 7885 7886 7887 7888 7889 7890 7891 7892 7893 7894 7895 7896 7897 7898 7899 7900 7901 7902 7903 7904 7905 7906 7907 7908 7909 7910 7911 7912 7913 7914 7915 7916 7917 7918 7919 7920 7921 7922 7923 7924 7925 7926 7927 7928 7929 7930 7931 7932 7933 7934 7935 7936 7937 7938 7939 7940 7941 7942 7943 7944 7945 7946 7947 7948 7949 7950 7951 7952 7953 7954 7955 7956 7957 7958 7959 7960 7961 7962 7963 7964 7965 7966 7967 7968 7969 7970 7971 7972 7973 7974 7975 7976 7977 7978 7979 7980 7981 7982 7983 7984 7985 7986 7987 7988 7989 7990 7991 7992 7993 7994 7995 7996 7997 7998 7999 8000 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010 8011 8012 8013 8014 8015 8016 8017 8018 8019 8020 8021 8022 8023 8024 8025 8026 8027 8028 8029 8030 8031 8032 8033 8034 8035 8036 8037 8038 8039 8040 8041 8042 8043 8044 8045 8046 8047 8048 8049 8050 8051 8052 8053 8054 8055 8056 8057 8058 8059 8060 8061 8062 8063 8064 8065 8066 8067 8068 8069 8070 8071 8072 8073 8074 8075 8076 8077 8078 8079 8080 8081 8082 8083 8084 8085 8086 8087 8088 8089 8090 8091 8092 8093 8094 8095 8096 8097 8098 8099 8100 8101 8102 8103 8104 8105 8106 8107 8108 8109 8110 8111 8112 8113 8114 8115 8116 8117 8118 8119 8120 8121 8122 8123 8124 8125 8126 8127 8128 8129 8130 8131 8132 8133 8134 8135 8136 8137 8138 8139 8140 8141 8142 8143 8144 8145 8146 8147 8148 8149 8150 8151 8152 8153 8154 8155 8156 8157 8158 8159 8160 8161 8162 8163 8164 8165 8166 8167 8168 8169 8170 8171 8172 8173 8174 8175 8176 8177 8178 8179 8180 8181 8182 8183 8184 8185 8186 8187 8188 8189 8190 8191 8192 8193 8194 8195 8196 8197 8198 8199 8200 8201 8202 8203 8204 8205 8206 8207 8208 8209 8210 8211 8212 8213 8214 8215 8216 8217 8218 8219 8220 8221 8222 8223 8224 8225 8226 8227 8228 8229 8230 8231 8232 8233 8234 8235 8236 8237 8238 8239 8240 8241 8242 8243 8244 8245 8246 8247 8248 8249 8250 8251 8252 8253 8254 8255 8256 8257 8258 8259 8260 8261 8262 8263 8264 8265 8266 8267 8268 8269 8270 8271 8272 8273 8274 8275 8276 8277 8278 8279 8280 8281 8282 8283 8284 8285 8286 8287 8288 8289 8290 8291 8292 8293 8294 8295 8296 8297 8298 8299 8300 8301 8302 8303 8304 8305 8306 8307 8308 8309 8310 8311 8312 8313 8314 8315 8316 8317 8318 8319 8320 8321 8322 8323 8324 8325 8326 8327 8328 8329 8330 8331 8332 8333 8334 8335 8336 8337 8338 8339 8340 8341 8342 8343 8344 8345 8346 8347 8348 8349 8350 8351 8352 8353 8354 8355 8356 8357 8358 8359 8360 8361 8362 8363 8364 8365 8366 8367 8368 8369 8370 8371 8372 8373 8374 8375 8376 8377 8378 8379 8380 8381 8382 8383 8384 8385 8386 8387 8388 8389 8390 8391 8392 8393 8394 8395 8396 8397 8398 8399 8400 8401 8402 8403 8404 8405 8406 8407 8408 8409 8410 8411 8412 8413 8414 8415 8416 8417 8418 8419 8420 8421 8422 8423 8424 8425 8426 8427 8428 8429 8430 8431 8432 8433 8434 8435 8436 8437 8438 8439 8440 8441 8442 8443 8444 8445 8446 8447 8448 8449 8450 8451 8452 8453 8454 8455 8456 8457 8458 8459 8460 8461 8462 8463 8464 8465 8466 8467 8468 8469 8470 8471 8472 8473 8474 8475 8476 8477 8478 8479 8480 8481 8482 8483 8484 8485 8486 8487 8488 8489 8490 8491 8492 8493 8494 8495 8496 8497 8498 8499 8500 8501 8502 8503 8504 8505 8506 8507 8508 8509 8510 8511 8512 8513 8514 8515 8516 8517 8518 8519 8520 8521 8522 8523 8524 8525 8526 8527 8528 8529 8530 8531 8532 8533 8534 8535 8536 8537 8538 8539 8540 8541 8542 8543 8544 8545 8546 8547 8548 8549 8550 8551 8552 8553 8554 8555 8556 8557 8558 8559 8560 8561 8562 8563 8564 8565 8566 8567 8568 8569 8570 8571 8572 8573 8574 8575 8576 8577 8578 8579 8580 8581 8582 8583 8584 8585 8586 8587 8588 8589 8590 8591 8592 8593 8594 8595 8596 8597 8598 8599 8600 8601 8602 8603 8604 8605 8606 8607 8608 8609 8610 8611 8612 8613 8614 8615 8616 8617 8618 8619 8620 8621 8622 8623 8624 8625 8626 8627 8628 8629 8630 8631 8632 8633 8634 8635 8636 8637 8638 8639 8640 8641 8642 8643 8644 8645 8646 8647 8648 8649 8650 8651 8652 8653 8654 8655 8656 8657 8658 8659 8660 8661 8662 8663 8664 8665 8666 8667 8668 8669 8670 8671 8672 8673 8674 8675 8676 8677 8678 8679 8680 8681 8682 8683 8684 8685 8686 8687 8688 8689 8690 8691 8692 8693 8694 8695 8696 8697 8698 8699 8700 8701 8702 8703 8704 8705 8706 8707 8708 8709 8710 8711 8712 8713 8714 8715 8716 8717 8718 8719 8720 8721 8722 8723 8724 8725 8726 8727 8728 8729 8730 8731 8732 8733 8734 8735 8736 8737 8738 8739 8740 8741 8742 8743 8744 8745 8746 8747 8748 8749 8750 8751 8752 8753 8754 8755 8756 8757 8758 8759 8760 8761 8762 8763 8764 8765 8766 8767 8768 8769 8770 8771 8772 8773 8774 8775 8776 8777 8778 8779 8780 8781 8782 8783 8784 8785 8786 8787 8788 8789 8790 8791 8792 8793 8794 8795 8796 8797 8798 8799 8800 8801 8802 8803 8804 8805 8806 8807 8808 8809 8810 8811 8812 8813 8814 8815 8816 8817 8818 8819 8820 8821 8822 8823 8824 8825 8826 8827 8828 8829 8830 8831 8832 8833 8834 8835 8836 8837 8838 8839 8840 8841 8842 8843 8844 8845 8846 8847 8848 8849 8850 8851 8852 8853 8854 8855 8856 8857 8858 8859 8860 8861 8862 8863 8864 8865 8866 8867 8868 8869 8870 8871 8872 8873 8874 8875 8876 8877 8878 8879 8880 8881 8882 8883 8884 8885 8886 8887 8888 8889 8890 8891 8892 8893 8894 8895 8896 8897 8898 8899 8900 8901 8902 8903 8904 8905 8906 8907 8908 8909 8910 8911 8912 8913 8914 8915 8916 8917 8918 8919 8920 8921 8922 8923 8924 8925 8926 8927 8928 8929 8930 8931 8932 8933 8934 8935 8936 8937 8938 8939 8940 8941 8942 8943 8944 8945 8946 8947 8948 8949 8950 8951 8952 8953 8954 8955 8956 8957 8958 8959 8960 8961 8962 8963 8964 8965 8966 8967 8968 8969 8970 8971 8972 8973 8974 8975 8976 8977 8978 8979 8980 8981 8982 8983 8984 8985 8986 8987 8988 8989 8990 8991 8992 8993 8994 8995 8996 8997 8998 8999 9000 9001 9002 9003 9004 9005 9006 9007 9008 9009 9010 9011 9012 9013 9014 9015 9016 9017 9018 9019 9020 9021 9022 9023 9024 9025 9026 9027 9028 9029 9030 9031 9032 9033 9034 9035 9036 9037 9038 9039 9040 9041 9042 9043 9044 9045 9046 9047 9048 9049 9050 9051 9052 9053 9054 9055 9056 9057 9058 9059 9060 9061 9062 9063 9064 9065 9066 9067 9068 9069 9070 9071 9072 9073 9074 9075 9076 9077 9078 9079 9080 9081 9082 9083 9084 9085 9086 9087 9088 9089 9090 9091 9092 9093 9094 9095 9096 9097 9098 9099 9100 9101 9102 9103 9104 9105 9106 9107 9108 9109 9110 9111 9112 9113 9114 9115 9116 9117 9118 9119 9120 9121 9122 9123 9124 9125 9126 9127 9128 9129 9130 9131 9132 9133 9134 9135 9136 9137 9138 9139 9140 9141 9142 9143 9144 9145 9146 9147 9148 9149 9150 9151 9152 9153 9154 9155 9156 9157 9158 9159 9160 9161 9162 9163 9164 9165 9166 9167 9168 9169 9170 9171 9172 9173 9174 9175 9176 9177 9178 9179 9180 9181 9182 9183 9184 9185 9186 9187 9188 9189 9190 9191 9192 9193 9194 9195 9196 9197 9198 9199 9200 9201 9202 9203 9204 9205 9206 9207 9208 9209 9210 9211 9212 9213 9214 9215 9216 9217 9218 9219 9220 9221 9222 9223 9224 9225 9226 9227 9228 9229 9230 9231 9232 9233 9234 9235 9236 9237 9238 9239 9240 9241 9242 9243 9244 9245 9246 9247 9248 9249 9250 9251 9252 9253 9254 9255 9256 9257 9258 9259 9260 9261 9262 9263 9264 9265 9266 9267 9268 9269 9270 9271 9272 9273 9274 9275 9276 9277 9278 9279 9280 9281 9282 9283 9284 9285 9286 9287 9288 9289 9290 9291 9292 9293 9294 9295 9296 9297 9298 9299 9300 9301 9302 9303 9304 9305 9306 9307 9308 9309 9310 9311 9312 9313 9314 9315 9316 9317 9318 9319 9320 9321 9322 9323 9324 9325 9326 9327 9328 9329 9330 9331 9332 9333 9334 9335 9336 9337 9338 9339 9340 9341 9342 9343 9344 9345 9346 9347 9348 9349 9350 9351 9352 9353 9354 9355 9356 9357 9358 9359 9360 9361 9362 9363 9364 9365 9366 9367 9368 9369 9370 9371 9372 9373 9374 9375 9376 9377 9378 9379 9380 9381 9382 9383 9384 9385 9386 9387 9388 9389 9390 9391 9392 9393 9394 9395 9396 9397 9398 9399 9400 9401 9402 9403 9404 9405 9406 9407 9408 9409 9410 9411 9412 9413 9414 9415 9416 9417 9418 9419 9420 9421 9422 9423 9424 9425 9426 9427 9428 9429 9430 9431 9432 9433 9434 9435 9436 9437 9438 9439 9440 9441 9442 9443 9444 9445 9446 9447 9448 9449 9450 9451 9452 9453 9454 9455 9456 9457 9458 9459 9460 9461 9462 9463 9464 9465 9466 9467 9468 9469 9470 9471 9472 9473 9474 9475 9476 9477 9478 9479 9480 9481 9482 9483 9484 9485 9486 9487 9488 9489 9490 9491 9492 9493 9494 9495 9496 9497 9498 9499 9500 9501 9502 9503 9504 9505 9506 9507 9508 9509 9510 9511 9512 9513 9514 9515 9516 9517 9518 9519 9520 9521 9522 9523 9524 9525 9526 9527 9528 9529 9530 9531 9532 9533 9534 9535 9536 9537 9538 9539 9540 9541 9542 9543 9544 9545 9546 9547 9548 9549 9550 9551 9552 9553 9554 9555 9556 9557 9558 9559 9560 9561 9562 9563 9564 9565 9566 9567 9568 9569 9570 9571 9572 9573 9574 9575 9576 9577 9578 9579 9580 9581 9582 9583 9584 9585 9586 9587 9588 9589 9590 9591 9592 9593 9594 9595 9596 9597 9598 9599 9600 9601 9602 9603 9604 9605 9606 9607 9608 9609 9610 9611 9612 9613 9614 9615 9616 9617 9618 9619 9620 9621 9622 9623 9624 9625 9626 9627 9628 9629 9630 9631 9632 9633 9634 9635 9636 9637 9638 9639 9640 9641 9642 9643 9644 9645 9646 9647 9648 9649 9650 9651 9652 9653 9654 9655 9656 9657 9658 9659 9660 9661 9662 9663 9664 9665 9666 9667 9668 9669 9670 9671 9672 9673 9674 9675 9676 9677 9678 9679 9680 9681 9682 9683 9684 9685 9686 9687 9688 9689 9690 9691 9692 9693 9694 9695 9696 9697 9698 9699 9700 9701 9702 9703 9704 9705 9706 9707 9708 9709 9710 9711 9712 9713 9714 9715 9716 9717 9718 9719 9720 9721 9722 9723 9724 9725 9726 9727 9728 9729 9730 9731 9732 9733 9734 9735 9736 9737 9738 9739 9740 9741 9742 9743 9744 9745 9746 9747 9748 9749 9750 9751 9752 9753 9754 9755 9756 9757 9758 9759 9760 9761 9762 9763 9764 9765 9766 9767 9768 9769 9770 9771 9772 9773 9774 9775 9776 9777 9778 9779 9780 9781 9782 9783 9784 9785 9786 9787 9788 9789 9790 9791 9792 9793 9794 9795 9796 9797 9798 9799 9800 9801 9802 9803 9804 9805 9806 9807 9808 9809 9810 9811 9812 9813 9814 9815 9816 9817 9818 9819 9820 9821 9822 9823 9824 9825 9826 9827 9828 9829 9830 9831 9832 9833 9834 9835 9836 9837 9838 9839 9840 9841 9842 9843 9844 9845 9846 9847 9848 9849 9850 9851 9852 9853 9854 9855 9856 9857 9858 9859 9860 9861 9862 9863 9864 9865 9866 9867 9868 9869 9870 9871 9872 9873 9874 9875 9876 9877 9878 9879 9880 9881 9882 9883 9884 9885 9886 9887 9888 9889 9890 9891 9892 9893 9894 9895 9896 9897 9898 9899 9900 9901 9902 9903 9904 9905 9906 9907 9908 9909 9910 9911 9912 9913 9914 9915 9916 9917 9918 9919 9920 9921 9922 9923 9924 9925 9926 9927 9928 9929 9930 9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943 9944 9945 9946 9947 9948 9949 9950 9951 9952 9953 9954 9955 9956 9957 9958 9959 9960 9961 9962 9963 9964 9965 9966 9967 9968 9969 9970 9971 9972 9973 9974 9975 9976 9977 9978 9979 9980 9981 9982 9983 9984 9985 9986 9987 9988 9989 9990 9991 9992 9993 9994 9995 9996 9997 9998 9999 10000 10001 10002 10003 10004 10005 10006 10007 10008 10009 10010 10011 10012 10013 10014 10015 10016 10017 10018 10019 10020 10021 10022 10023 10024 10025 10026 10027 10028 10029 10030 10031 10032 10033 10034 10035 10036 10037 10038 10039 10040 10041 10042 10043 10044 10045 10046 10047 10048 10049 10050 10051 10052 10053 10054 10055 10056 10057 10058 10059 10060 10061 10062 10063 10064 10065 10066 10067 10068 10069 10070 10071 10072 10073 10074 10075 10076 10077 10078 10079 10080 10081 10082 10083 10084 10085 10086 10087 10088 10089 10090 10091 10092 10093 10094 10095 10096 10097 10098 10099 10100 10101 10102 10103 10104 10105 10106 10107 10108 10109 10110 10111 10112 10113 10114 10115 10116 10117 10118 10119 10120 10121 10122 10123 10124 10125 10126 10127 10128 10129 10130 10131 10132 10133 10134 10135 10136 10137 10138 10139 10140 10141 10142 10143 10144 10145 10146 10147 10148 10149 10150 10151 10152 10153 10154 10155 10156 10157 10158 10159 10160 10161 10162 10163 10164 10165 10166 10167 10168 10169 10170 10171 10172 10173 10174 10175 10176 10177 10178 10179 10180 10181 10182 10183 10184 10185 10186 10187 10188 10189 10190 10191 10192 10193 10194 10195 10196 10197 10198 10199 10200 10201 10202 10203 10204 10205 10206 10207 10208 10209 10210 10211 10212 10213 10214 10215 10216 10217 10218 10219 10220 10221 10222 10223 10224 10225 10226 10227 10228 10229 10230 10231 10232 10233 10234 10235 10236 10237 10238 10239 10240 10241 10242 10243 10244 10245 10246 10247 10248 10249 10250 10251 10252 10253 10254 10255 10256 10257 10258 10259 10260 10261 10262 10263 10264 10265 10266 10267 10268 10269 10270 10271 10272 10273 10274 10275 10276 10277 10278 10279 10280 10281 10282 10283 10284 10285 10286 10287 10288 10289 10290 10291 10292 10293 10294 10295 10296 10297 10298 10299 10300 10301 10302 10303 10304 10305 10306 10307 10308 10309 10310 10311 10312 10313 10314 10315 10316 10317 10318 10319 10320 10321 10322 10323 10324 10325 10326 10327 10328 10329 10330 10331 10332 10333 10334 10335 10336 10337 10338 10339 10340 10341 10342 10343 10344 10345 10346 10347 10348 10349 10350 10351 10352 10353 10354 10355 10356 10357 10358 10359 10360 10361 10362 10363 10364 10365 10366 10367 10368 10369 10370 10371 10372 10373 10374 10375 10376 10377 10378 10379 10380 10381 10382 10383 10384 10385 10386 10387 10388 10389 10390 10391 10392 10393 10394 10395 10396 10397 10398 10399 10400 10401 10402 10403 10404 10405 10406 10407 10408 10409 10410 10411 10412 10413 10414 10415 10416 10417 10418 10419 10420 10421 10422 10423 10424 10425 10426 10427 10428 10429 10430 10431 10432 10433 10434 10435 10436 10437 10438 10439 10440 10441 10442 10443 10444 10445 10446 10447 10448 10449 10450 10451 10452 10453 10454 10455 10456 10457 10458 10459 10460 10461 10462 10463 10464 10465 10466 10467 10468 10469 10470 10471 10472 10473 10474 10475 10476 10477 10478 10479 10480 10481 10482 10483 10484 10485 10486 10487 10488 10489 10490 10491 10492 10493 10494 10495 10496 10497 10498 10499 10500 10501 10502 10503 10504 10505 10506 10507 10508 10509 10510 10511 10512 10513 10514 10515 10516 10517 10518 10519 10520 10521 10522 10523 10524 10525 10526 10527 10528 10529 10530 10531 10532 10533 10534 10535 10536 10537 10538 10539 10540 10541 10542 10543 10544 10545 10546 10547 10548 10549 10550 10551 10552 10553 10554 10555 10556 10557 10558 10559 10560 10561 10562 10563 10564 10565 10566 10567 10568 10569 10570 10571 10572 10573 10574 10575 10576 10577 10578 10579 10580 10581 10582 10583 10584 10585 10586 10587 10588 10589 10590 10591 10592 10593 10594 10595 10596 10597 10598 10599 10600 10601 10602 10603 10604 10605 10606 10607 10608 10609 10610 10611 10612 10613 10614 10615 10616 10617 10618 10619 10620 10621 10622 10623 10624 10625 10626 10627 10628 10629 10630 10631 10632 10633 10634 10635 10636 10637 10638 10639 10640 10641 10642 10643 10644 10645 10646 10647 10648 10649 10650 10651 10652 10653 10654 10655 10656 10657 10658 10659 10660 10661 10662 10663 10664 10665 10666 10667 10668 10669 10670 10671 10672 10673 10674 10675 10676 10677 10678 10679 10680 10681 10682 10683 10684 10685 10686 10687 10688 10689 10690 10691 10692 10693 10694 10695 10696 10697 10698 10699 10700 10701 10702 10703 10704 10705 10706 10707 10708 10709 10710 10711 10712 10713 10714 10715 10716 10717 10718 10719 10720 10721 10722 10723 10724 10725 10726 10727 10728 10729 10730 10731 10732 10733 10734 10735 10736 10737 10738 10739 10740 10741 10742 10743 10744 10745 10746 10747 10748 10749 10750 10751 10752 10753 10754 10755 10756 10757 10758 10759 10760 10761 10762 10763 10764 10765 10766 10767 10768 10769 10770 10771 10772 10773 10774 10775 10776 10777 10778 10779 10780 10781 10782 10783 10784 10785 10786 10787 10788 10789 10790 10791 10792 10793 10794 10795 10796 10797 10798 10799 10800 10801 10802 10803 10804 10805 10806 10807 10808 10809 10810 10811 10812 10813 10814 10815 10816 10817 10818 10819 10820 10821 10822 10823 10824 10825 10826 10827 10828 10829 10830 10831 10832 10833 10834 10835 10836 10837 10838 10839 10840 10841 10842 10843 10844 10845 10846 10847 10848 10849 10850 10851 10852 10853 10854 10855 10856 10857 10858 10859 10860 10861 10862 10863 10864 10865 10866 10867 10868 10869 10870 10871 10872 10873 10874 10875 10876 10877 10878 10879 10880 10881 10882 10883 10884 10885 10886 10887 10888 10889 10890 10891 10892 10893 10894 10895 10896 10897 10898 10899 10900 10901 10902 10903 10904 10905 10906 10907 10908 10909 10910 10911 10912 10913 10914 10915 10916 10917 10918 10919 10920 10921 10922 10923 10924 10925 10926 10927 10928 10929 10930 10931 10932 10933 10934 10935 10936 10937 10938 10939 10940 10941 10942 10943 10944 10945 10946 10947 10948 10949 10950 10951 10952 10953 10954 10955 10956 10957 10958 10959 10960 10961 10962 10963 10964 10965 10966 10967 10968 10969 10970 10971 10972 10973 10974 10975 10976 10977 10978 10979 10980 10981 10982 10983 10984 10985 10986 10987 10988 10989 10990 10991 10992 10993 10994 10995 10996 10997 10998 10999 11000 11001 11002 11003 11004 11005 11006 11007 11008 11009 11010 11011 11012 11013 11014 11015 11016 11017 11018 11019 11020 11021 11022 11023 11024 11025 11026 11027 11028 11029 11030 11031 11032 11033 11034 11035 11036 11037 11038 11039 11040 11041 11042 11043 11044 11045 11046 11047 11048 11049 11050 11051 11052 11053 11054 11055 11056 11057 11058 11059 11060 11061 11062 11063 11064 11065 11066 11067 11068 11069 11070 11071 11072 11073 11074 11075 11076 11077 11078 11079 11080 11081 11082 11083 11084 11085 11086 11087 11088 11089 11090 11091 11092 11093 11094 11095 11096 11097 11098 11099 11100 11101 11102 11103 11104 11105 11106 11107 11108 11109 11110 11111 11112 11113 11114 11115 11116 11117 11118 11119 11120 11121 11122 11123 11124 11125 11126 11127 11128 11129 11130 11131 11132 11133 11134 11135 11136 11137 11138 11139 11140 11141 11142 11143 11144 11145 11146 11147 11148 11149 11150 11151 11152 11153 11154 11155 11156 11157 11158 11159 11160 11161 11162 11163 11164 11165 11166 11167 11168 11169 11170 11171 11172 11173 11174 11175 11176 11177 11178 11179 11180 11181 11182 11183 11184 11185 11186 11187 11188 11189 11190 11191 11192 11193 11194 11195 11196 11197 11198 11199 11200 11201 11202 11203 11204 11205 11206 11207 11208 11209 11210 11211 11212 11213 11214 11215 11216 11217 11218 11219 11220 11221 11222 11223 11224 11225 11226 11227 11228 11229 11230 11231 11232 11233 11234 11235 11236 11237 11238 11239 11240 11241 11242 11243 11244 11245 11246 11247 11248 11249 11250 11251 11252 11253 11254 11255 11256 11257 11258 11259 11260 11261 11262 11263 11264 11265 11266 11267 11268 11269 11270 11271 11272 11273 11274 11275 11276 11277 11278 11279 11280 11281 11282 11283 11284 11285 11286 11287 11288 11289 11290 11291 11292 11293 11294 11295 11296 11297 11298 11299 11300 11301 11302 11303 11304 11305 11306 11307 11308 11309 11310 11311 11312 11313 11314 11315 11316 11317 11318 11319 11320 11321 11322 11323 11324 11325 11326 11327 11328 11329 11330 11331 11332 11333 11334 11335 11336 11337 11338 11339 11340 11341 11342 11343 11344 11345 11346 11347 11348 11349 11350 11351 11352 11353 11354 11355 11356 11357 11358 11359 11360 11361 11362 11363 11364 11365 11366 11367 11368 11369 11370 11371 11372 11373 11374 11375 11376 11377 11378 11379 11380 11381 11382 11383 11384 11385 11386 11387 11388 11389 11390 11391 11392 11393 11394 11395 11396 11397 11398 11399 11400 11401 11402 11403 11404 11405 11406 11407 11408 11409 11410 11411 11412 11413 11414 11415 11416 11417 11418 11419 11420 11421 11422 11423 11424 11425 11426 11427 11428 11429 11430 11431 11432 11433 11434 11435 11436 11437 11438 11439 11440 11441 11442 11443 11444 11445 11446 11447 11448 11449 11450 11451 11452 11453 11454 11455 11456 11457 11458 11459 11460 11461 11462 11463 11464 11465 11466 11467 11468 11469 11470 11471 11472 11473 11474 11475 11476 11477 11478 11479 11480 11481 11482 11483 11484 11485 11486 11487 11488 11489 11490 11491 11492 11493 11494 11495 11496 11497 11498 11499 11500 11501 11502 11503 11504 11505 11506 11507 11508 11509 11510 11511 11512 11513 11514 11515 11516 11517 11518 11519 11520 11521 11522 11523 11524 11525 11526 11527 11528 11529 11530 11531 11532 11533 11534 11535 11536 11537 11538 11539 11540 11541 11542 11543 11544 11545 11546 11547 11548 11549 11550 11551 11552 11553 11554 11555 11556 11557 11558 11559 11560 11561 11562 11563 11564 11565 11566 11567 11568 11569 11570 11571 11572 11573 11574 11575 11576 11577 11578 11579 11580 11581 11582 11583 11584 11585 11586 11587 11588 11589 11590 11591 11592 11593 11594 11595 11596 11597 11598 11599 11600 11601 11602 11603 11604 11605 11606 11607 11608 11609 11610 11611 11612 11613 11614 11615 11616 11617 11618 11619 11620 11621 11622 11623 11624 11625 11626 11627 11628 11629 11630 11631 11632 11633 11634 11635 11636 11637 11638 11639 11640 11641 11642 11643 11644 11645 11646 11647 11648 11649 11650 11651 11652 11653 11654 11655 11656 11657 11658 11659 11660 11661 11662 11663 11664 11665 11666 11667 11668 11669 11670 11671 11672 11673 11674 11675 11676 11677 11678 11679 11680 11681 11682 11683 11684 11685 11686 11687 11688 11689 11690 11691 11692 11693 11694 11695 11696 11697 11698 11699 11700 11701 11702 11703 11704 11705 11706 11707 11708 11709 11710 11711 11712 11713 11714 11715 11716 11717 11718 11719 11720 11721 11722 11723 11724 11725 11726 11727 11728 11729 11730 11731 11732 11733 11734 11735 11736 11737 11738 11739 11740 11741 11742 11743 11744 11745 11746 11747 11748 11749 11750 11751 11752 11753 11754 11755 11756 11757 11758 11759 11760 11761 11762 11763 11764 11765 11766 11767 11768 11769 11770 11771 11772 11773 11774 11775 11776 11777 11778 11779 11780 11781 11782 11783 11784 11785 11786 11787 11788 11789 11790 11791 11792 11793 11794 11795 11796 11797 11798 11799 11800 11801 11802 11803 11804 11805 11806 11807 11808 11809 11810 11811 11812 11813 11814 11815 11816 11817 11818 11819 11820 11821 11822 11823 11824 11825 11826 11827 11828 11829 11830 11831 11832 11833 11834 11835 11836 11837 11838 11839 11840 11841 11842 11843 11844 11845 11846 11847 11848 11849 11850 11851 11852 11853 11854 11855 11856 11857 11858 11859 11860 11861 11862 11863 11864 11865 11866 11867 11868 11869 11870 11871 11872 11873 11874 11875 11876 11877 11878 11879 11880 11881 11882 11883 11884 11885 11886 11887 11888 11889 11890 11891 11892 11893 11894 11895 11896 11897 11898 11899 11900 11901 11902 11903 11904 11905 11906 11907 11908 11909 11910 11911 11912 11913 11914 11915 11916 11917 11918 11919 11920 11921 11922 11923 11924 11925 11926 11927 11928 11929 11930 11931 11932 11933 11934 11935 11936 11937 11938 11939 11940 11941 11942 11943 11944 11945 11946 11947 11948 11949 11950 11951 11952 11953 11954 11955 11956 11957 11958 11959 11960 11961 11962 11963 11964 11965 11966 11967 11968 11969 11970 11971 11972 11973 11974 11975 11976 11977 11978 11979 11980 11981 11982 11983 11984 11985 11986 11987 11988 11989 11990 11991 11992 11993 11994 11995 11996 11997 11998 11999 12000 12001 12002 12003 12004 12005 12006 12007 12008 12009 12010 12011 12012 12013 12014 12015 12016 12017 12018 12019 12020 12021 12022 12023 12024 12025 12026 12027 12028 12029 12030 12031 12032 12033 12034 12035 12036 12037 12038 12039 12040 12041 12042 12043 12044 12045 12046 12047 12048 12049 12050 12051 12052 12053 12054 12055 12056 12057 12058 12059 12060 12061 12062 12063 12064 12065 12066 12067 12068 12069 12070 12071 12072 12073 12074 12075 12076 12077 12078 12079 12080 12081 12082 12083 12084 12085 12086 12087 12088 12089 12090 12091 12092 12093 12094 12095 12096 12097 12098 12099 12100 12101 12102 12103 12104 12105 12106 12107 12108 12109 12110 12111 12112 12113 12114 12115 12116 12117 12118 12119 12120 12121 12122 12123 12124 12125 12126 12127 12128 12129 12130 12131 12132 12133 12134 12135 12136 12137 12138 12139 12140 12141 12142 12143 12144 12145 12146 12147 12148 12149 12150 12151 12152 12153 12154 12155 12156 12157 12158 12159 12160 12161 12162 12163 12164 12165 12166 12167 12168 12169 12170 12171 12172 12173 12174 12175 12176 12177 12178 12179 12180 12181 12182 12183 12184 12185 12186 12187 12188 12189 12190 12191 12192 12193 12194 12195 12196 12197 12198 12199 12200 12201 12202 12203 12204 12205 12206 12207 12208 12209 12210 12211 12212 12213 12214 12215 12216 12217 12218 12219 12220 12221 12222 12223 12224 12225 12226 12227 12228 12229 12230 12231 12232 12233 12234 12235 12236 12237 12238 12239 12240 12241 12242 12243 12244 12245 12246 12247 12248 12249 12250 12251 12252 12253 12254 12255 12256 12257 12258 12259 12260 12261 12262 12263 12264 12265 12266 12267 12268 12269 12270 12271 12272 12273 12274 12275 12276 12277 12278 12279 12280 12281 12282 12283 12284 12285 12286 12287 12288 12289 12290 12291 12292 12293 12294 12295 12296 12297 12298 12299 12300 12301 12302 12303 12304 12305 12306 12307 12308 12309 12310 12311 12312 12313 12314 12315 12316 12317 12318 12319 12320 12321 12322 12323 12324 12325 12326 12327 12328 12329 12330 12331 12332 12333 12334 12335 12336 12337 12338 12339 12340 12341 12342 12343 12344 12345 12346 12347 12348 12349 12350 12351 12352 12353 12354 12355 12356 12357 12358 12359 12360 12361 12362 12363 12364 12365 12366 12367 12368 12369 12370 12371 12372 12373 12374 12375 12376 12377 12378 12379 12380 12381 12382 12383 12384 12385 12386 12387 12388 12389 12390 12391 12392 12393 12394 12395 12396 12397 12398 12399 12400 12401 12402 12403 12404 12405 12406 12407 12408 12409 12410 12411 12412 12413 12414 12415 12416 12417 12418 12419 12420 12421 12422 12423 12424 12425 12426 12427 12428 12429 12430 12431 12432 12433 12434 12435 12436 12437 12438 12439 12440 12441 12442 12443 12444 12445 12446 12447 12448 12449 12450 12451 12452 12453 12454 12455 12456 12457 12458 12459 12460 12461 12462 12463 12464 12465 12466 12467 12468 12469 12470 12471 12472 12473 12474 12475 12476 12477 12478 12479 12480 12481 12482 12483 12484 12485 12486 12487 12488 12489 12490 12491 12492 12493 12494 12495 12496 12497 12498 12499 12500 12501 12502 12503 12504 12505 12506 12507 12508 12509 12510 12511 12512 12513 12514 12515 12516 12517 12518 12519 12520 12521 12522 12523 12524 12525 12526 12527 12528 12529 12530 12531 12532 12533 12534 12535 12536 12537 12538 12539 12540 12541 12542 12543 12544 12545 12546 12547 12548 12549 12550 12551 12552 12553 12554 12555 12556 12557 12558 12559 12560 12561 12562 12563 12564 12565 12566 12567 12568 12569 12570 12571 12572 12573 12574 12575 12576 12577 12578 12579 12580 12581 12582 12583 12584 12585 12586 12587 12588 12589 12590 12591 12592 12593 12594 12595 12596 12597 12598 12599 12600 12601 12602 12603 12604 12605 12606 12607 12608 12609 12610 12611 12612 12613 12614 12615 12616 12617 12618 12619 12620 12621 12622 12623 12624 12625 12626 12627 12628 12629 12630 12631 12632 12633 12634 12635 12636 12637 12638 12639 12640 12641 12642 12643 12644 12645 12646 12647 12648 12649 12650 12651 12652 12653 12654 12655 12656 12657 12658 12659 12660 12661 12662 12663 12664 12665 12666 12667 12668 12669 12670 12671 12672 12673 12674 12675 12676 12677 12678 12679 12680 12681 12682 12683 12684 12685 12686 12687 12688 12689 12690 12691 12692 12693 12694 12695 12696 12697 12698 12699 12700 12701 12702 12703 12704 12705 12706 12707 12708 12709 12710 12711 12712 12713 12714 12715 12716 12717 12718 12719 12720 12721 12722 12723 12724 12725 12726 12727 12728 12729 12730 12731 12732 12733 12734 12735 12736 12737 12738 12739 12740 12741 12742 12743 12744 12745 12746 12747 12748 12749 12750 12751 12752 12753 12754 12755 12756 12757 12758 12759 12760 12761 12762 12763 12764 12765 12766 12767 12768 12769 12770 12771 12772 12773 12774 12775 12776 12777 12778 12779 12780 12781 12782 12783 12784 12785 12786 12787 12788 12789 12790 12791 12792 12793 12794 12795 12796 12797 12798 12799 12800 12801 12802 12803 12804 12805 12806 12807 12808 12809 12810 12811 12812 12813 12814 12815 12816 12817 12818 12819 12820 12821 12822 12823 12824 12825 12826 12827 12828 12829 12830 12831 12832 12833 12834 12835 12836 12837 12838 12839 12840 12841 12842 12843 12844 12845 12846 12847 12848 12849 12850 12851 12852 12853 12854 12855 12856 12857 12858 12859 12860 12861 12862 12863 12864 12865 12866 12867 12868 12869 12870 12871 12872 12873 12874 12875 12876 12877 12878 12879 12880 12881 12882 12883 12884 12885 12886 12887 12888 12889 12890 12891 12892 12893 12894 12895 12896 12897 12898 12899 12900 12901 12902 12903 12904 12905 12906 12907 12908 12909 12910 12911 12912 12913 12914 12915 12916 12917 12918 12919 12920 12921 12922 12923 12924 12925 12926 12927 12928 12929 12930 12931 12932 12933 12934 12935 12936 12937 12938 12939 12940 12941 12942 12943 12944 12945 12946 12947 12948 12949 12950 12951 12952 12953 12954 12955 12956 12957 12958 12959 12960 12961 12962 12963 12964 12965 12966 12967 12968 12969 12970 12971 12972 12973 12974 12975 12976 12977 12978 12979 12980 12981 12982 12983 12984 12985 12986 12987 12988 12989 12990 12991 12992 12993 12994 12995 12996 12997 12998 12999 13000 13001 13002 13003 13004 13005 13006 13007 13008 13009 13010 13011 13012 13013 13014 13015 13016 13017 13018 13019 13020 13021 13022 13023 13024 13025 13026 13027 13028 13029 13030 13031 13032 13033 13034 13035 13036 13037 13038 13039 13040 13041 13042 13043 13044 13045 13046 13047 13048 13049 13050 13051 13052 13053 13054 13055 13056 13057 13058 13059 13060 13061 13062 13063 13064 13065 13066 13067 13068 13069 13070 13071 13072 13073 13074 13075 13076 13077 13078 13079 13080 13081 13082 13083 13084 13085 13086 13087 13088 13089 13090 13091 13092 13093 13094 13095 13096 13097 13098 13099 13100 13101 13102 13103 13104 13105 13106 | # DP: updates from the 4.8 branch upto 20150426 (r222448).
last_updated()
{
cat > ${dir}LAST_UPDATED <<EOF
Sun Apr 26 17:17:45 CEST 2015
Sun Apr 26 15:17:45 UTC 2015 (revision 222448)
EOF
}
LANG=C svn diff svn://gcc.gnu.org/svn/gcc/tags/gcc_4_8_4_release svn://gcc.gnu.org/svn/gcc/branches/gcc-4_8-branch \
| sed -r 's,^--- (\S+)\t(\S+)(.*)$,--- a/src/\1\t\2,;s,^\+\+\+ (\S+)\t(\S+)(.*)$,+++ b/src/\1\t\2,' \
| awk '/^Index:.*\.(class|texi)/ {skip=1; next} /^Index:/ { skip=0 } skip==0'
Index: libquadmath/configure
===================================================================
--- a/src/libquadmath/configure (.../tags/gcc_4_8_4_release)
+++ b/src/libquadmath/configure (.../branches/gcc-4_8-branch)
@@ -613,7 +613,6 @@
LIBQUAD_USE_SYMVER_TRUE
toolexeclibdir
toolexecdir
-multi_basedir
MAINT
MAINTAINER_MODE_FALSE
MAINTAINER_MODE_TRUE
@@ -682,6 +681,7 @@
INSTALL_DATA
INSTALL_SCRIPT
INSTALL_PROGRAM
+multi_basedir
target_noncanonical
target_os
target_vendor
@@ -736,6 +736,7 @@
ac_subst_files=''
ac_user_opts='
enable_option_checking
+enable_multilib
enable_version_specific_runtime_libs
enable_dependency_tracking
with_bugurl
@@ -746,7 +747,6 @@
with_gnu_ld
enable_libtool_lock
enable_maintainer_mode
-enable_multilib
enable_symvers
enable_generated_files_in_srcdir
'
@@ -1379,6 +1379,7 @@
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-multilib build many library versions (default)
--enable-version-specific-runtime-libs
specify that runtime libraries should be installed
in a compiler-specific directory
@@ -1391,7 +1392,6 @@
--disable-libtool-lock avoid locking (might break parallel builds)
--enable-maintainer-mode enable make rules and dependencies not useful
(and sometimes confusing) to the casual installer
- --enable-multilib build many library versions (default)
--disable-symvers disable symbol versioning for libquadmath
--enable-generated-files-in-srcdir
put copies of generated files in source dir intended
@@ -2370,6 +2370,44 @@
+# Default to --enable-multilib
+# Check whether --enable-multilib was given.
+if test "${enable_multilib+set}" = set; then :
+ enableval=$enable_multilib; case "$enableval" in
+ yes) multilib=yes ;;
+ no) multilib=no ;;
+ *) as_fn_error "bad value $enableval for multilib option" "$LINENO" 5 ;;
+ esac
+else
+ multilib=yes
+fi
+
+
+# We may get other options which we leave undocumented:
+# --with-target-subdir, --with-multisrctop, --with-multisubdir
+# See config-ml.in if you want the gory details.
+
+if test "$srcdir" = "."; then
+ if test "$with_target_subdir" != "."; then
+ multi_basedir="$srcdir/$with_multisrctop../.."
+ else
+ multi_basedir="$srcdir/$with_multisrctop.."
+ fi
+else
+ multi_basedir="$srcdir/.."
+fi
+
+
+# Even if the default multilib is not a cross compilation,
+# it may be that some of the other multilibs are.
+if test $cross_compiling = no && test $multilib = yes \
+ && test "x${with_multisubdir}" != x ; then
+ cross_compiling=maybe
+fi
+
+ac_config_commands="$ac_config_commands default-1"
+
+
target_alias=${target_alias-$host_alias}
@@ -10527,7 +10565,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 10530 "configure"
+#line 10568 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -10633,7 +10671,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 10636 "configure"
+#line 10674 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -10918,44 +10956,7 @@
MAINT=$MAINTAINER_MODE_TRUE
-# Default to --enable-multilib
-# Check whether --enable-multilib was given.
-if test "${enable_multilib+set}" = set; then :
- enableval=$enable_multilib; case "$enableval" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) as_fn_error "bad value $enableval for multilib option" "$LINENO" 5 ;;
- esac
-else
- multilib=yes
-fi
-
-# We may get other options which we leave undocumented:
-# --with-target-subdir, --with-multisrctop, --with-multisubdir
-# See config-ml.in if you want the gory details.
-
-if test "$srcdir" = "."; then
- if test "$with_target_subdir" != "."; then
- multi_basedir="$srcdir/$with_multisrctop../.."
- else
- multi_basedir="$srcdir/$with_multisrctop.."
- fi
-else
- multi_basedir="$srcdir/.."
-fi
-
-
-# Even if the default multilib is not a cross compilation,
-# it may be that some of the other multilibs are.
-if test $cross_compiling = no && test $multilib = yes \
- && test "x${with_multisubdir}" != x ; then
- cross_compiling=maybe
-fi
-
-ac_config_commands="$ac_config_commands default-1"
-
-
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -13644,6 +13645,20 @@
#
# INIT-COMMANDS
#
+
+srcdir="$srcdir"
+host="$host"
+target="$target"
+with_multisubdir="$with_multisubdir"
+with_multisrctop="$with_multisrctop"
+with_target_subdir="$with_target_subdir"
+ac_configure_args="${multilib_arg} ${ac_configure_args}"
+multi_basedir="$multi_basedir"
+CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+CC="$CC"
+CXX="$CXX"
+GFORTRAN="$GFORTRAN"
+GCJ="$GCJ"
AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
@@ -13906,20 +13921,6 @@
-srcdir="$srcdir"
-host="$host"
-target="$target"
-with_multisubdir="$with_multisubdir"
-with_multisrctop="$with_multisrctop"
-with_target_subdir="$with_target_subdir"
-ac_configure_args="${multilib_arg} ${ac_configure_args}"
-multi_basedir="$multi_basedir"
-CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
-CC="$CC"
-CXX="$CXX"
-GFORTRAN="$GFORTRAN"
-GCJ="$GCJ"
-
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
@@ -13929,9 +13930,9 @@
do
case $ac_config_target in
"config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+ "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
"libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
- "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
*) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
@@ -14517,6 +14518,14 @@
case $ac_file$ac_mode in
+ "default-1":C)
+# Only add multilib support code if we just rebuilt the top-level
+# Makefile.
+case " $CONFIG_FILES " in
+ *" Makefile "*)
+ ac_file=Makefile . ${multi_basedir}/config-ml.in
+ ;;
+esac ;;
"depfiles":C) test x"$AMDEP_TRUE" != x"" || {
# Autoconf 2.62 quotes --file arguments for eval, but not when files
# are listed without --file. Let's play safe and only enable the eval
@@ -15251,14 +15260,6 @@
chmod +x "$ofile"
;;
- "default-1":C)
-# Only add multilib support code if we just rebuilt the top-level
-# Makefile.
-case " $CONFIG_FILES " in
- *" Makefile "*)
- ac_file=Makefile . ${multi_basedir}/config-ml.in
- ;;
-esac ;;
esac
done # for ac_tag
Index: libquadmath/ChangeLog
===================================================================
--- a/src/libquadmath/ChangeLog (.../tags/gcc_4_8_4_release)
+++ b/src/libquadmath/ChangeLog (.../branches/gcc-4_8-branch)
@@ -1,3 +1,8 @@
+2015-01-26 Matthias Klose <doko@ubuntu.com>
+
+ * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
+ * configure: Regenerate.
+
2014-12-19 Release Manager
* GCC 4.8.4 released.
Index: libquadmath/configure.ac
===================================================================
--- a/src/libquadmath/configure.ac (.../tags/gcc_4_8_4_release)
+++ b/src/libquadmath/configure.ac (.../branches/gcc-4_8-branch)
@@ -23,6 +23,8 @@
AC_CANONICAL_SYSTEM
ACX_NONCANONICAL_TARGET
+AM_ENABLE_MULTILIB(, ..)
+
target_alias=${target_alias-$host_alias}
AC_SUBST(target_alias)
@@ -60,7 +62,6 @@
AC_SUBST(enable_static)
AM_MAINTAINER_MODE
-AM_ENABLE_MULTILIB(, ..)
AC_LANG_C
# The same as in boehm-gc and libstdc++. Have to borrow it from there.
Index: libsanitizer/configure
===================================================================
--- a/src/libsanitizer/configure (.../tags/gcc_4_8_4_release)
+++ b/src/libsanitizer/configure (.../branches/gcc-4_8-branch)
@@ -662,7 +662,6 @@
MAINT
MAINTAINER_MODE_FALSE
MAINTAINER_MODE_TRUE
-multi_basedir
am__untar
am__tar
AMTAR
@@ -701,6 +700,7 @@
build_vendor
build_cpu
build
+multi_basedir
target_alias
host_alias
build_alias
@@ -742,8 +742,8 @@
ac_subst_files=''
ac_user_opts='
enable_option_checking
+enable_multilib
enable_version_specific_runtime_libs
-enable_multilib
enable_maintainer_mode
enable_dependency_tracking
enable_shared
@@ -1388,8 +1388,8 @@
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-multilib build many library versions (default)
--enable-version-specific-runtime-libs Specify that runtime libraries should be installed in a compiler-specific directory
- --enable-multilib build many library versions (default)
--enable-maintainer-mode enable make rules and dependencies not useful
(and sometimes confusing) to the casual installer
--disable-dependency-tracking speeds up one-time build
@@ -2417,6 +2417,44 @@
+# Default to --enable-multilib
+# Check whether --enable-multilib was given.
+if test "${enable_multilib+set}" = set; then :
+ enableval=$enable_multilib; case "$enableval" in
+ yes) multilib=yes ;;
+ no) multilib=no ;;
+ *) as_fn_error "bad value $enableval for multilib option" "$LINENO" 5 ;;
+ esac
+else
+ multilib=yes
+fi
+
+
+# We may get other options which we leave undocumented:
+# --with-target-subdir, --with-multisrctop, --with-multisubdir
+# See config-ml.in if you want the gory details.
+
+if test "$srcdir" = "."; then
+ if test "$with_target_subdir" != "."; then
+ multi_basedir="$srcdir/$with_multisrctop../.."
+ else
+ multi_basedir="$srcdir/$with_multisrctop.."
+ fi
+else
+ multi_basedir="$srcdir/.."
+fi
+
+
+# Even if the default multilib is not a cross compilation,
+# it may be that some of the other multilibs are.
+if test $cross_compiling = no && test $multilib = yes \
+ && test "x${with_multisubdir}" != x ; then
+ cross_compiling=maybe
+fi
+
+ac_config_commands="$ac_config_commands default-1"
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-version-specific-runtime-libs" >&5
$as_echo_n "checking for --enable-version-specific-runtime-libs... " >&6; }
# Check whether --enable-version-specific-runtime-libs was given.
@@ -3078,44 +3116,7 @@
-# Default to --enable-multilib
-# Check whether --enable-multilib was given.
-if test "${enable_multilib+set}" = set; then :
- enableval=$enable_multilib; case "$enableval" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) as_fn_error "bad value $enableval for multilib option" "$LINENO" 5 ;;
- esac
-else
- multilib=yes
-fi
-
-# We may get other options which we leave undocumented:
-# --with-target-subdir, --with-multisrctop, --with-multisubdir
-# See config-ml.in if you want the gory details.
-
-if test "$srcdir" = "."; then
- if test "$with_target_subdir" != "."; then
- multi_basedir="$srcdir/$with_multisrctop../.."
- else
- multi_basedir="$srcdir/$with_multisrctop.."
- fi
-else
- multi_basedir="$srcdir/.."
-fi
-
-
-# Even if the default multilib is not a cross compilation,
-# it may be that some of the other multilibs are.
-if test $cross_compiling = no && test $multilib = yes \
- && test "x${with_multisubdir}" != x ; then
- cross_compiling=maybe
-fi
-
-ac_config_commands="$ac_config_commands default-1"
-
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
# Check whether --enable-maintainer-mode was given.
@@ -11117,7 +11118,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11120 "configure"
+#line 11121 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11223,7 +11224,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11226 "configure"
+#line 11227 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
Index: libsanitizer/ChangeLog
===================================================================
--- a/src/libsanitizer/ChangeLog (.../tags/gcc_4_8_4_release)
+++ b/src/libsanitizer/ChangeLog (.../branches/gcc-4_8-branch)
@@ -1,3 +1,8 @@
+2015-01-27 Matthias Klose <doko@ubuntu.com>
+
+ * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
+ * configure: Regenerate.
+
2014-12-19 Release Manager
* GCC 4.8.4 released.
Index: libsanitizer/configure.ac
===================================================================
--- a/src/libsanitizer/configure.ac (.../tags/gcc_4_8_4_release)
+++ b/src/libsanitizer/configure.ac (.../branches/gcc-4_8-branch)
@@ -5,6 +5,8 @@
AC_INIT(package-unused, version-unused, libsanitizer)
AC_CONFIG_SRCDIR([include/sanitizer/common_interface_defs.h])
+AM_ENABLE_MULTILIB(, ..)
+
AC_MSG_CHECKING([for --enable-version-specific-runtime-libs])
AC_ARG_ENABLE(version-specific-runtime-libs,
[ --enable-version-specific-runtime-libs Specify that runtime libraries should be installed in a compiler-specific directory ],
@@ -24,7 +26,6 @@
GCC_LIBSTDCXX_RAW_CXX_FLAGS
AM_INIT_AUTOMAKE(foreign no-dist)
-AM_ENABLE_MULTILIB(, ..)
AM_MAINTAINER_MODE
# Calculate toolexeclibdir
Index: libstdc++-v3/include/std/future
===================================================================
--- a/src/libstdc++-v3/include/std/future (.../tags/gcc_4_8_4_release)
+++ b/src/libstdc++-v3/include/std/future (.../branches/gcc-4_8-branch)
@@ -1417,7 +1417,8 @@
operator()(_ArgTypes... __args)
{
__future_base::_State_base::_S_check(_M_state);
- _M_state->_M_run(std::forward<_ArgTypes>(__args)...);
+ auto __state = _M_state;
+ __state->_M_run(std::forward<_ArgTypes>(__args)...);
}
void
Index: libstdc++-v3/include/std/istream
===================================================================
--- a/src/libstdc++-v3/include/std/istream (.../tags/gcc_4_8_4_release)
+++ b/src/libstdc++-v3/include/std/istream (.../branches/gcc-4_8-branch)
@@ -870,7 +870,10 @@
template<typename _CharT, typename _Traits, typename _Tp>
inline basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>&& __is, _Tp& __x)
- { return (__is >> __x); }
+ {
+ __is >> __x;
+ return __is;
+ }
#endif // C++11
_GLIBCXX_END_NAMESPACE_VERSION
Index: libstdc++-v3/include/std/ostream
===================================================================
--- a/src/libstdc++-v3/include/std/ostream (.../tags/gcc_4_8_4_release)
+++ b/src/libstdc++-v3/include/std/ostream (.../branches/gcc-4_8-branch)
@@ -600,7 +600,10 @@
template<typename _CharT, typename _Traits, typename _Tp>
inline basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>&& __os, const _Tp& __x)
- { return (__os << __x); }
+ {
+ __os << __x;
+ return __os;
+ }
#endif // C++11
_GLIBCXX_END_NAMESPACE_VERSION
Index: libstdc++-v3/include/std/scoped_allocator
===================================================================
--- a/src/libstdc++-v3/include/std/scoped_allocator (.../tags/gcc_4_8_4_release)
+++ b/src/libstdc++-v3/include/std/scoped_allocator (.../branches/gcc-4_8-branch)
@@ -105,6 +105,8 @@
__inner_type_impl() = default;
__inner_type_impl(const __inner_type_impl&) = default;
__inner_type_impl(__inner_type_impl&&) = default;
+ __inner_type_impl& operator=(const __inner_type_impl&) = default;
+ __inner_type_impl& operator=(__inner_type_impl&&) = default;
template<typename _Alloc>
__inner_type_impl(const __inner_type_impl<_Alloc>& __other)
@@ -136,6 +138,8 @@
__inner_type_impl() = default;
__inner_type_impl(const __inner_type_impl&) = default;
__inner_type_impl(__inner_type_impl&&) = default;
+ __inner_type_impl& operator=(const __inner_type_impl&) = default;
+ __inner_type_impl& operator=(__inner_type_impl&&) = default;
template<typename... _Allocs>
__inner_type_impl(const __inner_type_impl<_Allocs...>& __other)
@@ -310,6 +314,12 @@
_M_inner(std::move(__other._M_inner))
{ }
+ scoped_allocator_adaptor&
+ operator=(const scoped_allocator_adaptor&) = default;
+
+ scoped_allocator_adaptor&
+ operator=(scoped_allocator_adaptor&&) = default;
+
inner_allocator_type& inner_allocator() noexcept
{ return _M_inner._M_get(this); }
Index: libstdc++-v3/ChangeLog
===================================================================
--- a/src/libstdc++-v3/ChangeLog (.../tags/gcc_4_8_4_release)
+++ b/src/libstdc++-v3/ChangeLog (.../branches/gcc-4_8-branch)
@@ -1,3 +1,29 @@
+2015-03-25 Jonathan Wakely <jwakely@redhat.com>
+
+ Backport from mainline
+ 2015-03-02 Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/65279
+ * include/std/scoped_allocator (__inner_type_impl,
+ scoped_allocator_adaptor): Add defaulted copy assignment and move
+ assignment operators.
+ * testsuite/20_util/scoped_allocator/65279.cc: New.
+
+2015-03-25 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR libstdc++/65543
+ * include/std/istream (operator>>(basic_istream<>&&, _Tp&): Revert
+ thinko in r150387.
+ * include/std/ostream (operator<<(basic_ostream<>&&, const _Tp&):
+ Likewise.
+ * testsuite/27_io/rvalue_streams-2.cc: New.
+
+2015-01-09 Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/60966
+ * include/std/future (packaged_task::operator()): Increment the
+ reference count on the shared state until the function returns.
+
2014-12-19 Release Manager
* GCC 4.8.4 released.
Index: libstdc++-v3/testsuite/27_io/rvalue_streams-2.cc
===================================================================
--- a/src/libstdc++-v3/testsuite/27_io/rvalue_streams-2.cc (.../tags/gcc_4_8_4_release)
+++ b/src/libstdc++-v3/testsuite/27_io/rvalue_streams-2.cc (.../branches/gcc-4_8-branch)
@@ -0,0 +1,35 @@
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+
+// Copyright (C) 2015 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <sstream>
+
+struct A {};
+
+void operator<<(std::ostream&, const A&) { }
+void operator>>(std::istream&, A&) { }
+
+// PR libstdc++/65543
+int main()
+{
+ A a;
+
+ std::ostringstream() << a;
+ std::istringstream() >> a;
+}
Index: libstdc++-v3/testsuite/20_util/scoped_allocator/65279.cc
===================================================================
--- a/src/libstdc++-v3/testsuite/20_util/scoped_allocator/65279.cc (.../tags/gcc_4_8_4_release)
+++ b/src/libstdc++-v3/testsuite/20_util/scoped_allocator/65279.cc (.../branches/gcc-4_8-branch)
@@ -0,0 +1,54 @@
+// Copyright (C) 2015 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+
+#include <memory>
+#include <type_traits>
+#include <scoped_allocator>
+
+template<typename T>
+ struct Allocator : std::allocator<T>
+ {
+ template<typename U>
+ struct rebind { using other = Allocator<U>; };
+
+ using propagate_on_container_copy_assignment = std::true_type;
+ using propagate_on_container_move_assignment = std::true_type;
+ };
+
+template<typename... T>
+ using alloc = std::scoped_allocator_adaptor<Allocator<T>...>;
+
+void
+test01()
+{
+ // Test partial specialization for sizeof...(InnerAlloc) == 0
+ alloc<int> a;
+ a = a;
+ a = std::move(a);
+}
+
+void
+test02()
+{
+ // Test partial specialization for sizeof...(InnerAlloc) >= 1
+ alloc<int, char> a;
+ a = a;
+ a = std::move(a);
+}
Index: libatomic/fop_n.c
===================================================================
--- a/src/libatomic/fop_n.c (.../tags/gcc_4_8_4_release)
+++ b/src/libatomic/fop_n.c (.../branches/gcc-4_8-branch)
@@ -112,9 +112,9 @@
pre_barrier (smodel);
- wptr = (UWORD *)mptr;
- shift = 0;
- mask = -1;
+ wptr = (UWORD *)((uintptr_t)mptr & -WORDSIZE);
+ shift = (((uintptr_t)mptr % WORDSIZE) * CHAR_BIT) ^ SIZE(INVERT_MASK);
+ mask = SIZE(MASK) << shift;
wopval = (UWORD)opval << shift;
woldval = __atomic_load_n (wptr, __ATOMIC_RELAXED);
@@ -136,9 +136,9 @@
pre_barrier (smodel);
- wptr = (UWORD *)mptr;
- shift = 0;
- mask = -1;
+ wptr = (UWORD *)((uintptr_t)mptr & -WORDSIZE);
+ shift = (((uintptr_t)mptr % WORDSIZE) * CHAR_BIT) ^ SIZE(INVERT_MASK);
+ mask = SIZE(MASK) << shift;
wopval = (UWORD)opval << shift;
woldval = __atomic_load_n (wptr, __ATOMIC_RELAXED);
Index: libatomic/ChangeLog
===================================================================
--- a/src/libatomic/ChangeLog (.../tags/gcc_4_8_4_release)
+++ b/src/libatomic/ChangeLog (.../branches/gcc-4_8-branch)
@@ -1,3 +1,8 @@
+2015-01-21 Andrew Waterman <waterman@cs.berkeley.edu>
+
+ * fop_n.c (libat_fetch_op): Align address to word boundary.
+ (libat_op_fetch): Likewise.
+
2014-12-19 Release Manager
* GCC 4.8.4 released.
Index: libbacktrace/configure
===================================================================
--- a/src/libbacktrace/configure (.../tags/gcc_4_8_4_release)
+++ b/src/libbacktrace/configure (.../branches/gcc-4_8-branch)
@@ -614,7 +614,6 @@
WARN_FLAGS
EXTRA_FLAGS
BACKTRACE_FILE
-multi_basedir
OTOOL64
OTOOL
LIPO
@@ -680,6 +679,7 @@
build_vendor
build_cpu
build
+multi_basedir
target_alias
host_alias
build_alias
@@ -721,6 +721,7 @@
ac_subst_files=''
ac_user_opts='
enable_option_checking
+enable_multilib
enable_maintainer_mode
with_target_subdir
enable_shared
@@ -729,7 +730,6 @@
enable_fast_install
with_gnu_ld
enable_libtool_lock
-enable_multilib
with_system_libunwind
'
ac_precious_vars='build_alias
@@ -1361,6 +1361,7 @@
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-multilib build many library versions (default)
--enable-maintainer-mode enable make rules and dependencies not useful
(and sometimes confusing) to the casual installer
--enable-shared[=PKGS] build shared libraries [default=no]
@@ -1368,7 +1369,6 @@
--enable-fast-install[=PKGS]
optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
- --enable-multilib build many library versions (default)
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -2451,6 +2451,46 @@
ac_config_headers="$ac_config_headers config.h"
+if test -n "${with_target_subdir}"; then
+ # Default to --enable-multilib
+# Check whether --enable-multilib was given.
+if test "${enable_multilib+set}" = set; then :
+ enableval=$enable_multilib; case "$enableval" in
+ yes) multilib=yes ;;
+ no) multilib=no ;;
+ *) as_fn_error "bad value $enableval for multilib option" "$LINENO" 5 ;;
+ esac
+else
+ multilib=yes
+fi
+
+
+# We may get other options which we leave undocumented:
+# --with-target-subdir, --with-multisrctop, --with-multisubdir
+# See config-ml.in if you want the gory details.
+
+if test "$srcdir" = "."; then
+ if test "$with_target_subdir" != "."; then
+ multi_basedir="$srcdir/$with_multisrctop../.."
+ else
+ multi_basedir="$srcdir/$with_multisrctop.."
+ fi
+else
+ multi_basedir="$srcdir/.."
+fi
+
+
+# Even if the default multilib is not a cross compilation,
+# it may be that some of the other multilibs are.
+if test $cross_compiling = no && test $multilib = yes \
+ && test "x${with_multisubdir}" != x ; then
+ cross_compiling=maybe
+fi
+
+ac_config_commands="$ac_config_commands default-1"
+
+fi
+
ac_aux_dir=
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
for ac_t in install-sh install.sh shtool; do
@@ -11087,7 +11127,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11090 "configure"
+#line 11130 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11193,7 +11233,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11196 "configure"
+#line 11236 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11437,43 +11477,6 @@
if test -n "${with_target_subdir}"; then
# We are compiling a GCC library. We can assume that the unwind
# library exists.
- # Default to --enable-multilib
-# Check whether --enable-multilib was given.
-if test "${enable_multilib+set}" = set; then :
- enableval=$enable_multilib; case "$enableval" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) as_fn_error "bad value $enableval for multilib option" "$LINENO" 5 ;;
- esac
-else
- multilib=yes
-fi
-
-
-# We may get other options which we leave undocumented:
-# --with-target-subdir, --with-multisrctop, --with-multisubdir
-# See config-ml.in if you want the gory details.
-
-if test "$srcdir" = "."; then
- if test "$with_target_subdir" != "."; then
- multi_basedir="$srcdir/$with_multisrctop../.."
- else
- multi_basedir="$srcdir/$with_multisrctop.."
- fi
-else
- multi_basedir="$srcdir/.."
-fi
-
-
-# Even if the default multilib is not a cross compilation,
-# it may be that some of the other multilibs are.
-if test $cross_compiling = no && test $multilib = yes \
- && test "x${with_multisubdir}" != x ; then
- cross_compiling=maybe
-fi
-
-ac_config_commands="$ac_config_commands default-1"
-
BACKTRACE_FILE="backtrace.lo simple.lo"
else
ac_fn_c_check_header_mongrel "$LINENO" "unwind.h" "ac_cv_header_unwind_h" "$ac_includes_default"
@@ -13128,7 +13131,21 @@
# INIT-COMMANDS
#
+srcdir="$srcdir"
+host="$host"
+target="$target"
+with_multisubdir="$with_multisubdir"
+with_multisrctop="$with_multisrctop"
+with_target_subdir="$with_target_subdir"
+ac_configure_args="${multilib_arg} ${ac_configure_args}"
+multi_basedir="$multi_basedir"
+CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+CC="$CC"
+CXX="$CXX"
+GFORTRAN="$GFORTRAN"
+GCJ="$GCJ"
+
# The HP-UX ksh and POSIX shell print the target directory to stdout
# if CDPATH is set.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
@@ -13388,20 +13405,6 @@
-srcdir="$srcdir"
-host="$host"
-target="$target"
-with_multisubdir="$with_multisubdir"
-with_multisrctop="$with_multisrctop"
-with_target_subdir="$with_target_subdir"
-ac_configure_args="${multilib_arg} ${ac_configure_args}"
-multi_basedir="$multi_basedir"
-CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
-CC="$CC"
-CXX="$CXX"
-GFORTRAN="$GFORTRAN"
-GCJ="$GCJ"
-
GCC="$GCC"
CC="$CC"
acx_cv_header_stdint="$acx_cv_header_stdint"
@@ -13434,8 +13437,8 @@
do
case $ac_config_target in
"config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+ "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
"libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
- "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
"gstdint.h") CONFIG_COMMANDS="$CONFIG_COMMANDS gstdint.h" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"backtrace-supported.h") CONFIG_FILES="$CONFIG_FILES backtrace-supported.h" ;;
@@ -14024,6 +14027,14 @@
case $ac_file$ac_mode in
+ "default-1":C)
+# Only add multilib support code if we just rebuilt the top-level
+# Makefile.
+case " $CONFIG_FILES " in
+ *" Makefile "*)
+ ac_file=Makefile . ${multi_basedir}/config-ml.in
+ ;;
+esac ;;
"libtool":C)
# See if we are running on zsh, and set the options which allow our
@@ -14663,14 +14674,6 @@
chmod +x "$ofile"
;;
- "default-1":C)
-# Only add multilib support code if we just rebuilt the top-level
-# Makefile.
-case " $CONFIG_FILES " in
- *" Makefile "*)
- ac_file=Makefile . ${multi_basedir}/config-ml.in
- ;;
-esac ;;
"gstdint.h":C)
if test "$GCC" = yes; then
echo "/* generated for " `$CC --version | sed 1q` "*/" > tmp-stdint.h
Index: libbacktrace/ChangeLog
===================================================================
--- a/src/libbacktrace/ChangeLog (.../tags/gcc_4_8_4_release)
+++ b/src/libbacktrace/ChangeLog (.../branches/gcc-4_8-branch)
@@ -1,3 +1,8 @@
+2015-01-26 Matthias Klose <doko@ubuntu.com>
+
+ * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
+ * configure: Regenerate.
+
2014-12-19 Release Manager
* GCC 4.8.4 released.
Index: libbacktrace/configure.ac
===================================================================
--- a/src/libbacktrace/configure.ac (.../tags/gcc_4_8_4_release)
+++ b/src/libbacktrace/configure.ac (.../branches/gcc-4_8-branch)
@@ -34,6 +34,10 @@
AC_CONFIG_SRCDIR(backtrace.h)
AC_CONFIG_HEADER(config.h)
+if test -n "${with_target_subdir}"; then
+ AM_ENABLE_MULTILIB(, ..)
+fi
+
AC_CANONICAL_SYSTEM
target_alias=${target_alias-$host_alias}
@@ -83,7 +87,6 @@
if test -n "${with_target_subdir}"; then
# We are compiling a GCC library. We can assume that the unwind
# library exists.
- AM_ENABLE_MULTILIB(, ..)
BACKTRACE_FILE="backtrace.lo simple.lo"
else
AC_CHECK_HEADER([unwind.h],
Index: libgcc/ChangeLog
===================================================================
--- a/src/libgcc/ChangeLog (.../tags/gcc_4_8_4_release)
+++ b/src/libgcc/ChangeLog (.../branches/gcc-4_8-branch)
@@ -1,3 +1,15 @@
+2015-02-17 Sandra Loosemore <sandra@codesourcery.com>
+
+ Backported from mainline
+ 2015-02-17 Sandra Loosemore <sandra@codesourcery.com>
+
+ * config/arm/bpabi.S (test_div_by_zero): Make label names
+ consistent between thumb2 and arm mode cases. Separate the
+ signed comparison on the high word of the numerator from the
+ unsigned comparison on the low word.
+ * config/arm/bpabi-v6m.S (test_div_by_zero): Similarly separate
+ signed comparison.
+
2014-12-19 Release Manager
* GCC 4.8.4 released.
Index: libgcc/config/arm/bpabi-v6m.S
===================================================================
--- a/src/libgcc/config/arm/bpabi-v6m.S (.../tags/gcc_4_8_4_release)
+++ b/src/libgcc/config/arm/bpabi-v6m.S (.../branches/gcc-4_8-branch)
@@ -85,10 +85,10 @@
cmp yyl, #0
bne 7f
cmp xxh, #0
+ .ifc \signed, unsigned
bne 2f
cmp xxl, #0
2:
- .ifc \signed, unsigned
beq 3f
mov xxh, #0
mvn xxh, xxh @ 0xffffffff
@@ -95,9 +95,11 @@
mov xxl, xxh
3:
.else
+ blt 6f
+ bgt 4f
+ cmp xxl, #0
beq 5f
- blt 6f
- mov xxl, #0
+4: mov xxl, #0
mvn xxl, xxl @ 0xffffffff
lsr xxh, xxl, #1 @ 0x7fffffff
b 5f
Index: libgcc/config/arm/bpabi.S
===================================================================
--- a/src/libgcc/config/arm/bpabi.S (.../tags/gcc_4_8_4_release)
+++ b/src/libgcc/config/arm/bpabi.S (.../branches/gcc-4_8-branch)
@@ -78,26 +78,29 @@
/* Tail-call to divide-by-zero handlers which may be overridden by the user,
so unwinding works properly. */
#if defined(__thumb2__)
- cbnz yyh, 1f
- cbnz yyl, 1f
+ cbnz yyh, 2f
+ cbnz yyl, 2f
cmp xxh, #0
+ .ifc \signed, unsigned
do_it eq
cmpeq xxl, #0
- .ifc \signed, unsigned
- beq 2f
- mov xxh, #0xffffffff
- mov xxl, xxh
-2:
+ do_it ne, t
+ movne xxh, #0xffffffff
+ movne xxl, #0xffffffff
.else
- do_it lt, t
+ do_it lt, tt
movlt xxl, #0
movlt xxh, #0x80000000
- do_it gt, t
- movgt xxh, #0x7fffffff
- movgt xxl, #0xffffffff
+ blt 1f
+ do_it eq
+ cmpeq xxl, #0
+ do_it ne, t
+ movne xxh, #0x7fffffff
+ movne xxl, #0xffffffff
.endif
+1:
b SYM (__aeabi_ldiv0) __PLT__
-1:
+2:
#else
/* Note: Thumb-1 code calls via an ARM shim on processors which
support ARM mode. */
@@ -105,16 +108,19 @@
cmpeq yyl, #0
bne 2f
cmp xxh, #0
+ .ifc \signed, unsigned
cmpeq xxl, #0
- .ifc \signed, unsigned
movne xxh, #0xffffffff
movne xxl, #0xffffffff
.else
movlt xxh, #0x80000000
movlt xxl, #0
- movgt xxh, #0x7fffffff
- movgt xxl, #0xffffffff
+ blt 1f
+ cmpeq xxl, #0
+ movne xxh, #0x7fffffff
+ movne xxl, #0xffffffff
.endif
+1:
b SYM (__aeabi_ldiv0) __PLT__
2:
#endif
Index: gcc/tree-vrp.c
===================================================================
--- a/src/gcc/tree-vrp.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/tree-vrp.c (.../branches/gcc-4_8-branch)
@@ -6811,7 +6811,7 @@
tree type = TREE_TYPE (op0);
value_range_t *vr0 = get_value_range (op0);
- if (vr0->type != VR_VARYING
+ if (vr0->type == VR_RANGE
&& INTEGRAL_TYPE_P (type)
&& vrp_val_is_min (vr0->min)
&& vrp_val_is_max (vr0->max)
@@ -9211,7 +9211,7 @@
substitute_and_fold (op_with_constant_singleton_value_range,
vrp_fold_stmt, false);
- if (warn_array_bounds)
+ if (warn_array_bounds && first_pass_instance)
check_all_array_refs ();
/* We must identify jump threading opportunities before we release
Index: gcc/tree-ssa-tail-merge.c
===================================================================
--- a/src/gcc/tree-ssa-tail-merge.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/tree-ssa-tail-merge.c (.../branches/gcc-4_8-branch)
@@ -550,7 +550,7 @@
if (!inverse_flags (e1, e2))
{
for (i = 0; i < e1->succ_flags.length (); ++i)
- if (e1->succ_flags[i] != e1->succ_flags[i])
+ if (e1->succ_flags[i] != e2->succ_flags[i])
return 0;
}
Index: gcc/c-family/c-opts.c
===================================================================
--- a/src/gcc/c-family/c-opts.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/c-family/c-opts.c (.../branches/gcc-4_8-branch)
@@ -1347,6 +1347,12 @@
static void
push_command_line_include (void)
{
+ /* This can happen if disabled by -imacros for example.
+ Punt so that we don't set "<command-line>" as the filename for
+ the header. */
+ if (include_cursor > deferred_count)
+ return;
+
if (!done_preinclude)
{
done_preinclude = true;
Index: gcc/c-family/ChangeLog
===================================================================
--- a/src/gcc/c-family/ChangeLog (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/c-family/ChangeLog (.../branches/gcc-4_8-branch)
@@ -1,3 +1,20 @@
+2015-02-11 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2014-07-24 Marek Polacek <polacek@redhat.com>
+
+ PR c/57653
+ * c-opts.c (c_finish_options): If -imacros is in effect, return.
+
+2015-01-20 Marek Polacek <polacek@redhat.com>
+
+ Backport from mainline
+ 2014-06-23 Marek Polacek <polacek@redhat.com>
+
+ PR c/61553
+ * c-common.c (get_atomic_generic_size): Don't segfault if the
+ type doesn't have a size.
+
2014-12-19 Release Manager
* GCC 4.8.4 released.
Index: gcc/c-family/c-common.c
===================================================================
--- a/src/gcc/c-family/c-common.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/c-family/c-common.c (.../branches/gcc-4_8-branch)
@@ -10143,7 +10143,8 @@
function);
return 0;
}
- size = tree_low_cst (TYPE_SIZE_UNIT (TREE_TYPE (type)), 1);
+ tree type_size = TYPE_SIZE_UNIT (TREE_TYPE (type));
+ size = type_size ? tree_low_cst (type_size, 1) : 0;
if (size != size_0)
{
error_at (loc, "size mismatch in argument %d of %qE", x + 1,
Index: gcc/c/c-typeck.c
===================================================================
--- a/src/gcc/c/c-typeck.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/c/c-typeck.c (.../branches/gcc-4_8-branch)
@@ -5788,7 +5788,8 @@
warning (OPT_Wtraditional, "traditional C rejects automatic "
"aggregate initialization");
- DECL_INITIAL (decl) = value;
+ if (value != error_mark_node || TREE_CODE (decl) != FUNCTION_DECL)
+ DECL_INITIAL (decl) = value;
/* ANSI wants warnings about out-of-range constant initializers. */
STRIP_TYPE_NOPS (value);
Index: gcc/c/ChangeLog
===================================================================
--- a/src/gcc/c/ChangeLog (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/c/ChangeLog (.../branches/gcc-4_8-branch)
@@ -1,3 +1,12 @@
+2015-02-01 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2015-01-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/64766
+ * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
+ of FUNCTION_DECLs with error_mark_node.
+
2014-12-19 Release Manager
* GCC 4.8.4 released.
Index: gcc/DATESTAMP
===================================================================
--- a/src/gcc/DATESTAMP (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/DATESTAMP (.../branches/gcc-4_8-branch)
@@ -1 +1 @@
-20141219
+20150426
Index: gcc/lra.c
===================================================================
--- a/src/gcc/lra.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/lra.c (.../branches/gcc-4_8-branch)
@@ -446,13 +446,13 @@
= create_alloc_pool ("insn regs", sizeof (struct lra_insn_reg), 100);
}
-/* Create LRA insn related info about referenced REGNO with TYPE
- (in/out/inout), biggest reference mode MODE, flag that it is
+/* Create LRA insn related info about a reference to REGNO in INSN with
+ TYPE (in/out/inout), biggest reference mode MODE, flag that it is
reference through subreg (SUBREG_P), flag that is early clobbered
in the insn (EARLY_CLOBBER), and reference to the next insn reg
info (NEXT). */
static struct lra_insn_reg *
-new_insn_reg (int regno, enum op_type type, enum machine_mode mode,
+new_insn_reg (rtx insn, int regno, enum op_type type, enum machine_mode mode,
bool subreg_p, bool early_clobber, struct lra_insn_reg *next)
{
struct lra_insn_reg *ir;
@@ -460,7 +460,8 @@
ir = (struct lra_insn_reg *) pool_alloc (insn_reg_pool);
ir->type = type;
ir->biggest_mode = mode;
- if (GET_MODE_SIZE (mode) > GET_MODE_SIZE (lra_reg_info[regno].biggest_mode))
+ if (GET_MODE_SIZE (mode) > GET_MODE_SIZE (lra_reg_info[regno].biggest_mode)
+ && NONDEBUG_INSN_P (insn))
lra_reg_info[regno].biggest_mode = mode;
ir->subreg_p = subreg_p;
ir->early_clobber = early_clobber;
@@ -942,7 +943,7 @@
&& ! (FIRST_STACK_REG <= regno
&& regno <= LAST_STACK_REG));
#endif
- list = new_insn_reg (regno, type, mode, subreg_p,
+ list = new_insn_reg (data->insn, regno, type, mode, subreg_p,
early_clobber, list);
}
}
@@ -1540,7 +1541,7 @@
expand_reg_info ();
if (bitmap_set_bit (&lra_reg_info[regno].insn_bitmap, uid))
{
- data->regs = new_insn_reg (regno, type, mode, subreg_p,
+ data->regs = new_insn_reg (data->insn, regno, type, mode, subreg_p,
early_clobber, data->regs);
return;
}
@@ -1552,8 +1553,9 @@
if (curr->subreg_p != subreg_p || curr->biggest_mode != mode)
/* The info can not be integrated into the found
structure. */
- data->regs = new_insn_reg (regno, type, mode, subreg_p,
- early_clobber, data->regs);
+ data->regs = new_insn_reg (data->insn, regno, type, mode,
+ subreg_p, early_clobber,
+ data->regs);
else
{
if (curr->type != type)
Index: gcc/rtlanal.c
===================================================================
--- a/src/gcc/rtlanal.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/rtlanal.c (.../branches/gcc-4_8-branch)
@@ -873,6 +873,17 @@
int
reg_set_p (const_rtx reg, const_rtx insn)
{
+ /* After delay slot handling, call and branch insns might be in a
+ sequence. Check all the elements there. */
+ if (INSN_P (insn) && GET_CODE (PATTERN (insn)) == SEQUENCE)
+ {
+ for (int i = 0; i < XVECLEN (PATTERN (insn), 0); ++i)
+ if (reg_set_p (reg, XVECEXP (PATTERN (insn), 0, i)))
+ return true;
+
+ return false;
+ }
+
/* We can be passed an insn or part of one. If we are passed an insn,
check if a side-effect of the insn clobbers REG. */
if (INSN_P (insn)
@@ -884,7 +895,7 @@
GET_MODE (reg), REGNO (reg)))
|| MEM_P (reg)
|| find_reg_fusage (insn, CLOBBER, reg)))))
- return 1;
+ return true;
return set_of (reg, insn) != NULL_RTX;
}
Index: gcc/fold-const.c
===================================================================
--- a/src/gcc/fold-const.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/fold-const.c (.../branches/gcc-4_8-branch)
@@ -10601,8 +10601,8 @@
/* Don't introduce overflows through reassociation. */
if (!any_overflows
- && ((lit0 && TREE_OVERFLOW (lit0))
- || (minus_lit0 && TREE_OVERFLOW (minus_lit0))))
+ && ((lit0 && TREE_OVERFLOW_P (lit0))
+ || (minus_lit0 && TREE_OVERFLOW_P (minus_lit0))))
return NULL_TREE;
if (minus_lit0)
Index: gcc/omp-low.c
===================================================================
--- a/src/gcc/omp-low.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/omp-low.c (.../branches/gcc-4_8-branch)
@@ -1369,7 +1369,8 @@
layout_type (type);
}
- TREE_TYPE (ctx->receiver_decl) = build_pointer_type (type);
+ TREE_TYPE (ctx->receiver_decl)
+ = build_qualified_type (build_reference_type (type), TYPE_QUAL_RESTRICT);
}
/* Instantiate decls as necessary in CTX to satisfy the data sharing
Index: gcc/ChangeLog
===================================================================
--- a/src/gcc/ChangeLog (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/ChangeLog (.../branches/gcc-4_8-branch)
@@ -1,3 +1,730 @@
+2015-04-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ Backport from mainline r222385
+ 2015-04-23 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ * config/rs6000/altivec.md (*altivec_lvx_<mode>_internal): Remove
+ asterisk from name so this can be generated directly.
+ (*altivec_stvx_<mode>_internal): Likewise.
+ * config/rs6000/rs6000.c (rs6000_emit_le_vsx_store): Add assert
+ that this is never called during or after reload/lra.
+ (rs6000_frame_related): Remove split_reg
+ argument and logic that references it.
+ (emit_frame_save): Remove last parameter from call to
+ rs6000_frame_related.
+ (rs6000_emit_prologue): Remove last parameter from eight calls to
+ rs6000_frame_related. Force generation of stvx instruction for
+ Altivec register saves. Remove split_reg handling, which is no
+ longer needed.
+ (rs6000_emit_epilogue): Force generation of lvx instruction for
+ Altivec register restores.
+
+2015-04-24 Michael Meissner <meissner@linux.vnet.ibm.com>
+
+ Backport from mainline
+ 2015-04-24 Michael Meissner <meissner@linux.vnet.ibm.com>
+
+ PR target/65849
+ * config/rs6000/rs6000.opt (-mvsx-align-128): Make options that
+ save to independent variables use the Save attribute. This will
+ allow these options to be modified with the #pragma/attribute
+ target support.
+ (-mallow-movmisalign): Likewise.
+ (-mallow-df-permute): Likewise.
+ (-msched-groups): Likewise.
+ (-malways-hint): Likewise.
+ (-malign-branch-targets): Likewise.
+ (-mvectorize-builtins): Likewise.
+ (-msave-toc-indirect): Likewise.
+
+ * config/rs6000/rs6000.c (rs6000_opt_masks): Add more options that
+ can be set via the #pragma/attribute target support.
+ (rs6000_opt_vars): Likewise.
+ (rs6000_inner_target_options): If VSX was set, also set
+ -mno-avoid-indexed-addresses.
+
+2015-04-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ Backport from mainline r222362
+ 2015-04-23 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ * config/rs6000/crypto.md (crypto_vpmsum<CR_char>): Change
+ TARGET_CRYPTO to TARGET_P8_VECTOR>
+ (crypto_vpermxor_<mode>): Likewise.
+ * config/rs6000/rs6000-builtin.def (BU_CRYPTO_2A): New #define.
+ (BU_CRYPTO_3A): Likewise.
+ (BU_CRYPTO_OVERLOAD_2A): Rename from BU_CRYPTO_OVERLOAD_2.
+ (BU_CRYPTO_OVERLOAD_3A): New #define.
+ (VPMSUMB): Change from BU_CRYPTO_2 to BU_CRYPTO_2A.
+ (VPMSUMH): Likewise.
+ (VPMSUMW): Likewise.
+ (VPMSUMD): Likewise.
+ (VPERMXOR_V2DI): Change from BU_CRYPTO_3 to BU_CRYPTO_3A.
+ (VPERMXOR_V4SI): Likewise.
+ (VPERMXOR_V8HI): Likewise.
+ (VPERMXOR_V16QI): Likewise.
+ (VPMSUM): Change from BU_CRYPTO_OVERLOAD_2 to
+ BU_CRYPTO_OVERLOAD_2A.
+ (VPERMXOR): Change from BU_CRYPTO_OVERLOAD3 to
+ BU_CRYPTO_OVERLOAD_3A.
+ * config/rs6000/rs6000.opt (mcrypto): Change description of
+ option.
+
+ Backport from mainline r222362
+ 2015-04-23 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ * config/rs6000/rs6000.opt (mcrypto): Change option description to
+ match category changes in ISA 2.07B.
+
+2015-04-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ Backport from mainline r222351
+ 2015-04-22 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ * config/rs6000/rs6000.c (rtx_is_swappable_p): Commentary
+ adjustments.
+ (insn_is_swappable_p): Return 1 for a convert from double to
+ single precision when all of its uses are splats of BE element
+ zero.
+
+2015-04-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ Backport from mainline r222349
+ 2015-04-22 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ PR target/65456
+ * config/rs6000/rs6000.c (rs6000_option_override_internal): For
+ VSX + POWER8, enable TARGET_ALLOW_MOVMISALIGN and
+ TARGET_EFFICIENT_UNALIGNED_VSX if not selected by command line
+ option.
+ (rs6000_builtin_mask_for_load): Return 0 for targets with
+ efficient unaligned VSX accesses so that the vectorizer will use
+ direct unaligned loads.
+ (rs6000_builtin_support_vector_misalignment): Always return true
+ for targets with efficient unaligned VSX accesses.
+ (rs6000_builtin_vectorization_cost): Cost of unaligned loads and
+ stores on targets with efficient unaligned VSX accesses is almost
+ always the same as the cost of an aligned load or store, so model
+ it that way.
+ * config/rs6000/rs6000.h (SLOW_UNALIGNED_ACCESS): Return 0 for
+ unaligned vectors if we have efficient unaligned VSX accesses.
+ * config/rs6000/rs6000.opt (mefficient-unaligned-vector): New
+ undocumented option.
+
+2015-04-18 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ Backport from mainline r222205
+ 2015-04-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR target/65787
+ * config/rs6000/rs6000.c (rtx_is_swappable_p): Ensure that a
+ subsequent SH_NONE operand does not overwrite an existing *special
+ value.
+ (adjust_extract): Handle case where a vec_extract operation is
+ wrapped in a PARALLEL.
+
+2015-04-02 John David Anglin <danglin@gcc.gnu.org>
+
+ * config/pa/pa.c (pa_output_move_double): Directly handle register
+ indexed memory operand. Simplify handling of scaled register indexed
+ memory operands.
+
+2015-03-31 Dominik Vogt <vogt@linux.vnet.ibm.com>
+
+ * config/s390/s390.c (s390_function_num_hotpatch_hw): Allow hotpatching
+ nested functions.
+ (s390_reorg): Adapt to new signature of s390_function_num_hotpatch_hw.
+ (s390_asm_output_function_label): Adapt to new signature of
+ s390_function_num_hotpatch_hw
+ Optimise the code generating assembler output.
+ Add comments to assembler file.
+
+2015-03-31 Dominik Vogt <vogt@linux.vnet.ibm.com>
+
+ * config/s390/s390.c (s390_function_num_hotpatch_hw): Remove special
+ cases for not hotpatching main () and artificial functions.
+
+2015-03-26 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ Backport of r214242, r214254, and bug fix patches from mainline
+ * config/rs6000/rs6000.c (tree-pass.h): New #include.
+ (rs6000_analyze_swaps): New declaration.
+ (gate_analyze_swaps): New function.
+ (execute_analyze_swaps): Likewise.
+ (pass_analyze_swaps): New struct rtl_opt_pass.
+ (rs6000_option_override): Register swap-optimization pass.
+ (swap_web_entry): New class.
+ (special_handling_values): New enum.
+ (union_defs): New function.
+ (union_uses): Likewise.
+ (insn_is_load_p): Likewise.
+ (insn_is_store_p): Likewise.
+ (insn_is_swap_p): Likewise.
+ (rtx_is_swappable_p): Likewise.
+ (insn_is_swappable_p): Likewise.
+ (chain_purpose): New enum.
+ (chain_contains_only_swaps): New function.
+ (mark_swaps_for_removal): Likewise.
+ (swap_const_vector_halves): Likewise.
+ (adjust_subreg_index): Likewise.
+ (permute_load): Likewise.
+ (permute_store): Likewise.
+ (adjust_extract): Likewise.
+ (adjust_splat): Likewise.
+ (handle_special_swappables): Likewise.
+ (replace_swap_with_copy): Likewise.
+ (dump_swap_insn_table): Likewise.
+ (rs6000_analyze_swaps): Likewise.
+ * config/rs6000/rs6000.opt (moptimize-swaps): New option.
+ * df.h (web_entry_base): New class, replacing struct web_entry.
+ (web_entry_base::pred): New method.
+ (web_entry_base::set_pred): Likewise.
+ (web_entry_base::unionfind_root): Likewise.
+ (web_entry_base::unionfind_union): Likewise.
+ (unionfind_root): Delete external reference.
+ (unionfind_union): Likewise.
+ (union_defs): Likewise.
+ * web.c (web_entry_base::unionfind_root): Convert to method.
+ (web_entry_base::unionfind_union): Likewise.
+ (web_entry): New class.
+ (union_match_dups): Convert to use class structure.
+ (union_defs): Likewise.
+ (entry_register): Likewise.
+ (web_main): Likewise.
+
+2015-03-26 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ * config/rs6000/vsx.md (*vsx_extract_<mode>_zero): Remove
+ endianness requirement.
+ (*vsx_extract_<mode>_one_le): Remove define_insn.
+
+2015-03-26 Oleg Endo <olegendo@gcc.gnu.org>
+
+ Backport from mainline
+ 2015-03-26 Oleg Endo <olegendo@gcc.gnu.org>
+
+ * config/sh/t-sh (MULTILIB_EXCEPTIONS): Handle default endian.
+
+2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR middle-end/65409
+ * expr.c (store_field): Do not do a direct block copy if the source is
+ a PARALLEL with BLKmode.
+
+2015-03-12 Dominik Vogt <vogt@linux.vnet.ibm.com>
+
+ * config/s390/s390.c (s390_reorg): Move code to output nops after label
+ to s390_reorg ().
+ (s390_asm_output_function_label): Likewise.
+ * config/s390/s390.c (s390_asm_output_function_label):
+ Fix function label alignment with -mhtopatch.
+ * config/s390/s390.md ("unspecv"): New values UNSPECV_NOP_2_BYTE,
+ UNSPECV_NOP_4_BYTE and UNSPECV_NOP_6_BYTE
+ ("nop_2_byte"): New define_insn.
+ ("nop_4_byte"): Likewise.
+ ("nop_6_byte"): Likewise.
+ * doc/extend.texi (hotpatch): hotpatch attribute doc fixes.
+ * doc/invoke.texi (-mhotpatch): -mhotpatch doc fixes.
+
+2015-03-12 Marek Polacek <polacek@redhat.com>
+
+ Backport from mainline
+ 2015-03-11 Marek Polacek <polacek@redhat.com>
+
+ PR tree-optimization/65388
+ * tree-ssa-tail-merge.c (same_succ_def::equal): Fix typo in comparison.
+
+2015-03-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/65286
+ * config/rs6000/t-linux: For powerpc64* target set
+ MULTILIB_OSDIRNAMES instead of MULTIARCH_DIRNAME.
+
+2015-03-10 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/53988
+ * config/sh/sh.md (*tst<mode>_t_zero): Remove insns.
+
+2015-03-10 Alan Modra <amodra@gmail.com>
+
+ PR target/65286
+ * config.gcc (powerpc*-*-linux*): Arrange for powerpc64le-linux
+ to be single-arch by default. Set cpu_is_64bit for powerpc64
+ given --with-cpu=native.
+ * config/rs6000/t-fprules: Do not set default MULTILIB vars.
+ * config/rs6000/t-linux (MULTIARCH_DIRNAME): Support powerpc64
+ and powerpc64le.
+ * config/rs6000/linux64.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Test
+ rs6000_isa_flags rather than TARGET_64BIT.
+
+2015-03-05 Michael Meissner <meissner@linux.vnet.ibm.com>
+
+ Backport from trunk
+ 2015-03-03 Michael Meissner <meissner@linux.vnet.ibm.com>
+
+ PR 65138/target
+ * config/rs6000/rs6000-cpus.def (powerpc64le): Add new generic
+ processor type for 64-bit little endian PowerPC.
+
+ * config/rs6000/rs6000.c (rs6000_option_override_internal): If
+ -mdebug=reg, print TARGET_DEFAULT. Fix logic to use
+ TARGET_DEFAULT if there is no default cpu. Fix -mdebug=reg
+ printing built-in mask so it does not pass NULL pointers.
+
+ * config/rs6000/rs6000-tables.opt: Regenerate.
+
+ * doc/invoke.texi (IBM RS/6000 and PowerPC options): Document
+ -mcpu=powerpc64le.
+
+ Backport from trunk
+ 2015-01-19 David Edelsohn <dje.gcc@gmail.com>
+
+ * config/rs6000/default64.h: Include rs6000-cpus.def.
+ (TARGET_DEFAULT) [LITTLE_ENDIAN]: Use ISA 2.7 (POWER8).
+ (TARGET_DEFAULT) [BIG_ENDIAN]: Use POWER4.
+ * config/rs6000/driver-rs6000.c (detect_processor_aix): Add POWER7
+ and POWER8.
+ * config/rs6000/linux64.h (PROCESSOR_DEFAULT64): Always default to
+ POWER8.
+ * config/rs6000/rs6000.c (rs6000_file_start): Emit .machine
+ pseudo-op to specify assembler dialect.
+
+2015-03-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+ Backport from mainline
+ 2014-11-27 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+ PR target/59593
+ * config/arm/arm.c (dump_minipool): dispatch to consttable pattern
+ based on mode size.
+ * config/arm/arm.md (consttable_1): Make it TARGET_EITHER.
+ (consttable_2): Make it TARGET_EITHER and move HFmode handling from
+ consttable_4 to it.
+ (consttable_4): Move HFmode handling to consttable_2 pattern.
+
+2015-03-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+ Backport from mainline
+ 2015-01-14 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+ PR target/64453
+ * config/arm/arm.c (callee_saved_reg_p): Define.
+ (arm_compute_save_reg0_reg12_mask): Use callee_saved_reg_p to check if
+ register is callee saved instead of !call_used_regs[reg].
+ (thumb1_compute_save_reg_mask): Likewise.
+
+2015-02-27 Richard Biener <rguenther@suse.de>
+
+ PR lto/65193
+ Backport from mainline
+ 2014-07-24 Jan Hubicka <hubicka@ucw.cz>
+
+ * lto-streamer-out.c (tree_is_indexable): Consider IMPORTED_DECL
+ as non-indexable.
+
+2015-02-26 Peter Bergner <bergner@vnet.ibm.com>
+
+ Backport from mainline
+ 2015-02-25 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
+
+ * config/rs6000/htm.md (tcheck): Fix assembly encoding.
+
+2015-02-26 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2014-11-27 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/61634
+ * tree-vect-slp.c: (vect_detect_hybrid_slp_stmts): Rewrite to
+ propagate hybrid down the SLP tree for one scalar statement.
+ (vect_detect_hybrid_slp_1): New walker function.
+ (vect_detect_hybrid_slp_2): Likewise.
+ (vect_detect_hybrid_slp): Properly handle pattern statements
+ in a pre-scan over all loop stmts.
+
+2015-02-25 Georg-Johann Lay <avr@gjlay.de>
+
+ PR target/65196
+ * config/avr/avr.c (avr_adjust_insn_length): Call recog_memoized
+ only with NONDEBUG_INSN_P.
+
+2015-02-25 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2015-02-16 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/63593
+ * tree-predcom.c (execute_pred_commoning_chain): Delay removing
+ stmts and releasing SSA names until...
+ (execute_pred_commoning): ... after processing all chains.
+
+ 2015-02-18 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/65063
+ * tree-predcom.c (determine_unroll_factor): Return 1 if we
+ have replaced looparound PHIs.
+
+2015-02-24 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2014-11-19 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/63844
+ * omp-low.c (fixup_child_record_type): Use a restrict qualified
+ referece type for the receiver parameter.
+
+2015-02-24 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2014-12-09 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/64199
+ * fold-const.c (fold_binary_loc): Use TREE_OVERFLOW_P.
+
+ 2015-01-14 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/64493
+ PR tree-optimization/64495
+ * tree-vect-loop.c (vect_finalize_reduction): For double-reductions
+ assign the proper vectorized PHI to the inner loop exit PHIs.
+
+2015-02-24 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2015-01-27 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/56273
+ PR tree-optimization/59124
+ PR tree-optimization/64277
+ * tree-vrp.c (vrp_finalize): Emit array-bound warnings only
+ from the first VRP pass.
+
+2015-02-24 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2015-02-11 Richard Biener <rguenther@suse.de>
+
+ PR lto/65015
+ * dwarf2out.c (gen_producer_string): Drop -fltrans-output-list
+ and -fresolution.
+
+ 2015-02-13 Richard Biener <rguenther@suse.de>
+
+ PR lto/65015
+ * dwarf2out.c (dwarf2out_finish): Use <artificial> as DW_AT_name
+ for LTO produced CUs.
+
+ 2015-02-16 Richard Biener <rguenther@suse.de>
+
+ PR lto/65015
+ * varasm.c (default_file_start): For LTO produced units
+ emit <artificial> as file directive.
+
+ 2015-01-17 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * dwarf2out.c (gen_producer_string): Ignore also OPT_fpreprocessed.
+
+2015-02-23 Oleg Endo <olegendo@gcc.gnu.org>
+
+ Backport from mainline
+ 2015-02-23 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/65163
+ * config/sh/sh.md (swapbsi2, related peephole2): Use const_int -65536
+ instead of const_int 4294901760.
+
+2015-02-23 Dominik Vogt <vogt@linux.vnet.ibm.com>
+
+ Backport from mainline
+ 2015-01-27 Dominik Vogt <vogt@linux.vnet.ibm.com>
+
+ * doc/extend.texi: s/390: Update documentation of hotpatch attribute.
+ * doc/invoke.texi (-mhotpatch): s/390: Update documentation of
+ -mhotpatch= option.
+ * config/s390/s390.opt (mhotpatch): s/390: Remove -mhotpatch and
+ -mno-hotpatch options. Change syntax of -mhotpatch= option.
+ * config/s390/s390.c (s390_hotpatch_trampoline_halfwords_default):
+ Renamed.
+ (s390_hotpatch_trampoline_halfwords_max): Renamed.
+ (s390_hotpatch_hw_max): New name.
+ (s390_hotpatch_trampoline_halfwords): Renamed.
+ (s390_hotpatch_hw_before_label): New name.
+ (get_hotpatch_attribute): Removed.
+ (s390_hotpatch_hw_after_label): New name.
+ (s390_handle_hotpatch_attribute): Add second parameter to hotpatch
+ attribute.
+ (s390_attribute_table): Ditto.
+ (s390_function_num_hotpatch_trampoline_halfwords): Renamed.
+ (s390_function_num_hotpatch_hw): New name.
+ Remove special handling of inline functions and hotpatching.
+ Return number of nops before and after the function label.
+ (s390_can_inline_p): Removed.
+ (s390_asm_output_function_label): Emit a configurable number of nops
+ after the function label.
+ (s390_option_override): Update -mhotpatch= syntax and remove -mhotpatch.
+ (TARGET_CAN_INLINE_P) Removed.
+ (TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P): New.
+
+2015-02-22 Uros Bizjak <ubizjak@gmail.com>
+
+ Backport from mainline
+ 2014-12-02 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/64113
+ * config/alpha/alpha.md (call_value_osf_tlsgd): Do not split insn
+ using post-reload splitter. Use peephole2 pass instead.
+ (call_value_osf_tlsldm): Ditto.
+ (TLS_CALL): New int iterator.
+ (tls): New int attribute.
+ (call_value_osf_<tls>): Merge insn pattern from call_value_osf_tlsgd
+ and call_value_tlsldm using TLS_CALL int iterator.
+
+2015-02-20 Uros Bizjak <ubizjak@gmail.com>
+
+ Backport from mainline
+ 2015-01-22 Wei Mi <wmi@google.com>
+
+ PR rtl-optimization/64557
+ * dse.c (record_store): Call get_addr for mem_addr.
+ (check_mem_read_rtx): Likewise.
+
+ Backport from mainline
+ 2014-10-20 Uros Bizjak <ubizjak@gmail.com>
+
+ * varasm.c (const_alias_set): Remove.
+ (init_varasm_once): Remove initialization of const_alias_set.
+ (build_constant_desc): Do not set alias set to const_alias_set.
+
+ Backport from mainline
+ 2014-10-14 Uros Bizjak <ubizjak@gmail.com>
+
+ PR rtl-optimization/63475
+ * alias.c (true_dependence_1): Always use get_addr to extract
+ true address operands from x_addr and mem_addr. Use extracted
+ address operands to check for references with alignment ANDs.
+ Use extracted address operands with find_base_term and
+ base_alias_check. For noncanonicalized operands call canon_rtx with
+ extracted address operand.
+ (write_dependence_1): Ditto.
+ (may_alias_p): Ditto. Remove unused calls to canon_rtx.
+
+ Backport from mainline
+ 2014-10-10 Uros Bizjak <ubizjak@gmail.com>
+
+ PR rtl-optimization/63483
+ * alias.c (true_dependence_1): Do not exit early for MEM_READONLY_P
+ references when alignment ANDs are involved.
+ (write_dependence_p): Ditto.
+ (may_alias_p): Ditto.
+
+ Backport from mainline
+ 2013-03-26 Richard Biener <rguenther@suse.de>
+
+ * alias.c (find_base_term): Avoid redundant and not used recursion.
+ (base_alias_check): Get the initial base term from the caller.
+ (true_dependence_1): Compute and pass base terms to base_alias_check.
+ (write_dependence_p): Likewise.
+ (may_alias_p): Likewise.
+
+2015-02-20 Georg-Johann Lay <avr@gjlay.de>
+
+ Backport from 2015-02-20 trunk r220847.
+
+ PR target/64452
+ * config/avr/avr.md (pushhi_insn): New insn.
+ (push<mode>1): Push virtual regs in one chunk using pushhi1_insn.
+
+2015-02-20 Uros Bizjak <ubizjak@gmail.com>
+
+ Backport from mainline
+ 2013-09-08 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * ira.c (update_equiv_regs): Only call set_paradoxical_subreg
+ for non-debug insns.
+ * lra.c (new_insn_reg): Take the containing insn as a parameter.
+ Only modify lra_reg_info[].biggest_mode if it's non-debug insn.
+ (collect_non_operand_hard_regs, add_regs_to_insn_regno_info): Update
+ accordingly.
+
+2015-02-17 Ilya Tocar <ilya.tocar@intel.com>
+
+ Backported from mainline
+ 2015-01-14 Ilya Tocar <ilya.tocar@intel.com>
+
+ PR target/64387
+ * config/i386/sse.md (vec_unpacks_hi_v8sf): Fix predicate.
+
+2015-02-12 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2015-02-09 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/64979
+ * tree-stdarg.c (pass_stdarg::execute): Scan phi node args for
+ va_list escapes.
+
+2015-02-11 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/alpha/alpha.md (reload_out<mode>_aligned): Make operands 2
+ and 3 earlyclobber operands.
+
+2015-02-05 Segher Boessenkool <segher@kernel.crashing.org>
+
+ PR target/64580
+ Backport from mainline
+ * config.rs6000/rs6000.c (compute_vrsave_mask): Reverse loop order.
+ (rs6000_stack_info): Add assert.
+ (rs6000_output_savres_externs): New function, split off from...
+ (rs6000_output_function_prologue): ... here. Do not call it for
+ thunks.
+
+2015-02-04 Uros Bizjak <ubizjak@gmail.com>
+
+ Backport from mainline
+ 2015-01-31 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/64882
+ * config/i386/predicates.md (address_no_seg_operand): Reject
+ non-CONST_INT_P operands in invalid mode.
+
+ Backport from mainline
+ 2015-01-31 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/i386/predicates.md (lea_address_operand): Call
+ address_operand with VOIDmode.
+ (vsib_address_operand): Ditto.
+
+2015-02-01 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2015-01-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/61058
+ * jump.c (cleanup_barriers): Update basic block boundaries
+ if BLOCK_FOR_INSN is non-NULL on PREV.
+
+ 2013-04-16 Steven Bosscher <steven@gcc.gnu.org>
+
+ PR middle-end/43631
+ * jump.c (cleanup_barriers): Use reorder_insns_nobb to avoid making
+ the moved barrier the tail of the basic block it follows.
+
+ 2015-01-26 Jakub Jelinek <jakub@redhat.com>
+
+ * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Add
+ OPTION_MASK_QUAD_MEMORY_ATOMIC.
+
+ 2015-01-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/64563
+ * tree-vrp.c (vrp_evaluate_conditional): Check for VR_RANGE
+ instead of != VR_VARYING.
+
+ PR target/64513
+ * config/i386/i386.c (ix86_expand_prologue): Add
+ REG_FRAME_RELATED_EXPR to %rax and %r10 pushes.
+
+2015-01-29 Ilya Tocar <ilya.tocar@intel.com>
+
+ * config/i386/avx2intrin.h (_mm256_bslli_epi128,
+ _mm256_bsrli_epi128): New.
+ * config/i386/emmintrin.h (_mm_bsrli_si128, _mm_bslli_si128): Ditto.
+
+2015-01-27 Mikael Pettersson <mikpelinux@gmail.com>
+
+ Backport from mainline
+
+ 2013-09-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ PR middle-end/57748
+ * expr.c (expand_assignment): Remove misalignp code path.
+
+ 2014-01-08 Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ PR middle-end/57748
+ * expr.h (expand_expr_real, expand_expr_real_1): Add new parameter
+ inner_reference_p.
+ (expand_expr, expand_normal): Adjust.
+ * expr.c (expand_expr_real, expand_expr_real_1): Add new parameter
+ inner_reference_p. Use inner_reference_p to expand inner references.
+ (store_expr): Adjust.
+ * cfgexpand.c (expand_call_stmt): Adjust.
+
+2015-01-26 Uros Bizjak <ubizjak@gmail.com>
+
+ Backport from mainline
+ 2015-01-26 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/64795
+ * config/i386/i386.md (*movdi_internal): Also check operand 0
+ to determine TYPE_LEA operand.
+ (*movsi_internal): Ditto.
+
+ Backport from mainline
+ 2015-01-23 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/i386/sse.md (sse2_loadld): Set attribute isa to sse2 for
+ alternative 1.
+
+2015-01-15 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2014-11-27 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/63704
+ * alias.c (mems_in_disjoint_alias_sets_p): Remove assert
+ and instead return false when !fstrict-aliasing.
+
+2015-01-14 Renlin Li <renlin.li@arm.com>
+
+ Backport form mainline
+ 2014-08-12 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
+
+ PR target/61413
+ * config/arm/arm.h (TARGET_CPU_CPP_BUILTINS): Fix definition
+ of __ARM_SIZEOF_WCHAR_T.
+
+2015-01-13 Pat Haugen <pthaugen@us.ibm.com>
+
+ Backport from mainline
+ 2014-12-20 Segher Boessenkool <segher@kernel.crashing.org>
+
+ PR target/64358
+ * config/rs6000/rs6000.c (rs6000_split_logical_inner): Swap the
+ input operands if only the second is inverted.
+ * config/rs6000/rs6000.md (*boolc<mode>3_internal1 for BOOL_128):
+ Swap BOOL_REGS_OP1 and BOOL_REGS_OP2. Correct arguments to
+ rs6000_split_logical.
+ (*boolc<mode>3_internal2 for TI2): Swap operands[1] and operands[2].
+
+2015-01-13 Oleg Endo <olegendo@gcc.gnu.org>
+
+ Backport form mainline
+ 2015-01-13 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/64479
+ * rtlanal.c (set_reg_p): Handle SEQUENCE constructs.
+
+2014-12-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ Backport from mainline:
+ 2014-12-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/64409
+ * config/i386/i386.c (ix86_function_type_abi): Issue an error
+ when ms_abi attribute is used with x32.
+
+2014-12-19 H.J. Lu <hongjiu.lu@intel.com>
+
+ Backported from mainline
+ 2014-12-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR rtl-optimization/64037
+ * combine.c (setup_incoming_promotions): Pass the argument
+ before any promotions happen to promote_function_mode.
+
2014-12-19 Release Manager
* GCC 4.8.4 released.
@@ -36,7 +768,7 @@
2014-12-10 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport from mainline
- 2014-09-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+ 2014-09-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* config/rs6000/rs6000-builtin.def (XVCVSXDDP_SCALE): New
built-in definition.
@@ -71,7 +803,7 @@
(vec_mul): Likewise.
Backport from mainline
- 2014-08-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+ 2014-08-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* config/rs6000/altivec.h (vec_xl): New #define.
(vec_xst): Likewise.
@@ -94,7 +826,7 @@
(vsx_xxspltd_<mode>): New insn.
Backport from mainline
- 2014-08-20 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+ 2014-08-20 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* config/rs6000/altivec.h (vec_cpsgn): New #define.
(vec_mergee): Likewise.
@@ -112,7 +844,7 @@
vec_any_ne, vec_mergee, vec_mergeo, vec_packsu, and vec_cntlz.
Backport from mainline
- 2014-07-20 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+ 2014-07-20 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* config/rs6000/altivec.md (unspec enum): Fix typo in UNSPEC_VSLDOI.
(altivec_vsldoi_<mode>): Likewise.
@@ -196,7 +928,7 @@
for immediate.
2014-11-19 Felix Yang <felix.yang@huawei.com>
- Shanyao Chen <chenshanyao@huawei.com>
+ Shanyao Chen <chenshanyao@huawei.com>
PR target/59593
* config/arm/arm.md (define_attr "arch"): Add v6t2.
@@ -382,7 +1114,7 @@
* config/pa/pa.md (trap): New insn. Add "trap" to attribute type.
Don't allow trap insn in in_branch_delay, in_nullified_branch_delay
or in_call_delay.
-
+
2014-11-06 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/aarch64/aarch64-elf-raw.h (CA53_ERR_835769_SPEC): Define.
@@ -1104,7 +1836,7 @@
Backport from mainline
2014-06-20 Julian Brown <julian@codesourcery.com>
- Chung-Lin Tang <cltang@codesourcery.com>
+ Chung-Lin Tang <cltang@codesourcery.com>
* config/arm/arm.c (arm_output_mi_thunk): Fix offset for
TARGET_THUMB1_ONLY. Add comments.
Index: gcc/testsuite/gcc.target/arm/divzero.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/arm/divzero.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/arm/divzero.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,85 @@
+/* { dg-require-effective-target arm_eabi } */
+/* { dg-options "" } */
+/* { dg-do run } */
+
+/* Check that long long divmod functions pass the right argument to
+ __aeabi_ldiv0 on divide by zero. */
+
+#ifdef DEBUGME
+#include <stdio.h>
+#else
+extern void abort (void);
+#endif
+
+/* Override div zero handler and simply return the provided value. */
+long long __aeabi_ldiv0 (long long r)
+{
+ return r;
+}
+
+long long lldiv (long long a, long long b)
+{
+ return a / b;
+}
+
+unsigned long long ulldiv (unsigned long long a, unsigned long long b)
+{
+ return a / b;
+}
+
+void check (long long num, long long expected)
+{
+ long long res = lldiv (num, 0LL);
+ if (res != expected)
+#ifdef DEBUGME
+ {
+ printf ("num=%08X:%08X\n", (unsigned)(num >> 32), (unsigned)num);
+ printf ("res=%08X:%08X\n", (unsigned)(res >> 32), (unsigned)res);
+ }
+#else
+ abort ();
+#endif
+}
+
+void ucheck (unsigned long long num, unsigned long long expected)
+{
+ unsigned long long res = ulldiv (num, 0ULL);
+ if (res != expected)
+#ifdef DEBUGME
+ {
+ printf ("num=%08X:%08X\n", (unsigned)(num >> 32), (unsigned)num);
+ printf ("res=%08X:%08X\n", (unsigned)(res >> 32), (unsigned)res);
+ }
+#else
+ abort ();
+#endif
+}
+
+#define POS_BIG 0x7fffffffffffffffLL
+#define NEG_BIG 0x8000000000000000LL
+#define UNS_BIG 0xffffffffffffffffULL
+
+int main ()
+{
+ check (0LL, 0LL);
+ check (1LL, POS_BIG);
+ check (0x000000007fffffffLL, POS_BIG);
+ check (0x00000000ffffffffLL, POS_BIG);
+ check (0x0000000100000000LL, POS_BIG);
+ check (POS_BIG, POS_BIG);
+ check (-1LL, NEG_BIG);
+ check (-0x000000007fffffffLL, NEG_BIG);
+ check (-0x00000000ffffffffLL, NEG_BIG);
+ check (-0x0000000100000000LL, NEG_BIG);
+ check (NEG_BIG, NEG_BIG);
+
+ ucheck (0ULL, 0ULL);
+ ucheck (1ULL, UNS_BIG);
+ ucheck (0x000000007fffffffULL, UNS_BIG);
+ ucheck (0x00000000ffffffffULL, UNS_BIG);
+ ucheck (0x0000000100000000ULL, UNS_BIG);
+ ucheck ((unsigned long long)POS_BIG, UNS_BIG);
+ ucheck (UNS_BIG, UNS_BIG);
+
+ return 0;
+}
Index: gcc/testsuite/gcc.target/arm/pr64453.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/arm/pr64453.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/arm/pr64453.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-mthumb -Os " } */
+/* { dg-require-effective-target arm_thumb1_ok } */
+
+void save_regs () {
+ __asm volatile ("" ::: "r8");
+}
+
+/* { dg-final { scan-assembler "\tmov\tr., r8" } } */
Index: gcc/testsuite/gcc.target/arm/constant-pool.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/arm/constant-pool.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/arm/constant-pool.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,27 @@
+/* { dg-do run } */
+/* { dg-options "-O1" } */
+
+unsigned short v = 0x5678;
+int i;
+int j = 0;
+int *ptr = &j;
+
+int
+func (void)
+{
+ for (i = 0; i < 1; ++i)
+ {
+ *ptr = -1;
+ v = 0x1234;
+ }
+ return v;
+}
+
+int
+main (void)
+{
+ func ();
+ if (v != 0x1234)
+ __builtin_abort ();
+ return 0;
+}
Index: gcc/testsuite/gcc.target/powerpc/swaps-p8-12.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/powerpc/swaps-p8-12.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/powerpc/swaps-p8-12.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,56 @@
+/* { dg-do compile { target { powerpc64le-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
+/* { dg-options "-mcpu=power8 -O3" } */
+/* { dg-final { scan-assembler "lxvd2x" } } */
+/* { dg-final { scan-assembler "stxvd2x" } } */
+/* { dg-final { scan-assembler-not "xxpermdi" } } */
+
+#include "altivec.h"
+void abort ();
+
+#define N 4096
+int ca[N] __attribute__((aligned(16)));
+int cb[N] __attribute__((aligned(16)));
+int cc[N] __attribute__((aligned(16)));
+int cd[N] __attribute__((aligned(16)));
+int hey;
+
+__attribute__((noinline)) void foo ()
+{
+ int i;
+ vector int va, vb, vc, vd, tmp;
+ vector unsigned int threes = vec_splat_u32(3);
+ for (i = 0; i < N; i+=4) {
+ vb = vec_vsx_ld (0, &cb[i]);
+ vc = vec_vsx_ld (0, &cc[i]);
+ vd = vec_vsx_ld (0, &cd[i]);
+ tmp = vec_add (vb, vc);
+ tmp = vec_sub (tmp, vd);
+ tmp = vec_sra (tmp, threes);
+ hey = tmp[3];
+ vec_vsx_st (tmp, 0, &ca[i]);
+ }
+}
+
+__attribute__((noinline)) void init ()
+{
+ int i;
+ for (i = 0; i < N; ++i) {
+ cb[i] = 3 * i - 2048;
+ cc[i] = -5 * i + 93;
+ cd[i] = i + 14;
+ }
+}
+
+int main ()
+{
+ int i;
+ init ();
+ foo ();
+ for (i = 0; i < N; ++i)
+ if (ca[i] != (-3 * i - 1969) >> 3)
+ abort ();
+ if (hey != ca[N-1])
+ abort ();
+ return 0;
+}
Index: gcc/testsuite/gcc.target/powerpc/swaps-p8-5.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/powerpc/swaps-p8-5.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/powerpc/swaps-p8-5.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,45 @@
+/* { dg-do compile { target { powerpc64le-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
+/* { dg-options "-mcpu=power8 -O3" } */
+/* { dg-final { scan-assembler "lxvd2x" } } */
+/* { dg-final { scan-assembler "stxvd2x" } } */
+/* { dg-final { scan-assembler-not "xxpermdi" } } */
+
+void abort ();
+
+#define N 4096
+int ca[N] __attribute__((aligned(16)));
+int cb[N] __attribute__((aligned(16)));
+int cc[N] __attribute__((aligned(16)));
+int cd[N] __attribute__((aligned(16)));
+
+__attribute__((noinline)) void foo ()
+{
+ int i;
+ for (i = 0; i < N; i++) {
+ ca[i] = ((cb[i] + cc[i]) * cd[i]) >> 3;
+ }
+}
+
+__attribute__((noinline)) void init ()
+{
+ int i;
+ for (i = 0; i < N; ++i) {
+ cb[i] = 3 * i - 2048;
+ cc[i] = -5 * i + 93;
+ cd[i] = i % 2 ? 1 : -1;
+ }
+}
+
+int main ()
+{
+ int i;
+ init ();
+ foo ();
+ for (i = 0; i < N; ++i)
+ if (i % 2 == 1 && ca[i] != (-2 * i - 1955) >> 3)
+ abort ();
+ else if (i % 2 == 0 && ca[i] != (1955 + 2 * i) >> 3)
+ abort ();
+ return 0;
+}
Index: gcc/testsuite/gcc.target/powerpc/swaps-p8-13.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/powerpc/swaps-p8-13.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/powerpc/swaps-p8-13.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,54 @@
+/* { dg-do run { target { powerpc64le-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
+/* { dg-options "-mcpu=power8 -O3" } */
+
+#include <altivec.h>
+void abort ();
+
+#define N 4096
+long long ca[N] __attribute__((aligned(16)));
+long long cb[N] __attribute__((aligned(16)));
+long long cc[N] __attribute__((aligned(16)));
+long long cd[N] __attribute__((aligned(16)));
+long long x;
+
+__attribute__((noinline)) void foo ()
+{
+ int i;
+ vector long long va, vb, vc, vd, tmp;
+ volatile unsigned long long three = 3;
+ vector unsigned long long threes = vec_splats (three);
+ for (i = 0; i < N; i+=2) {
+ vb = vec_vsx_ld (0, (vector long long *)&cb[i]);
+ vc = vec_vsx_ld (0, (vector long long *)&cc[i]);
+ vd = vec_vsx_ld (0, (vector long long *)&cd[i]);
+ tmp = vec_add (vb, vc);
+ tmp = vec_sub (tmp, vd);
+ tmp = vec_sra (tmp, threes);
+ x = vec_extract (tmp, 0);
+ vec_vsx_st (tmp, 0, (vector long long *)&ca[i]);
+ }
+}
+
+__attribute__((noinline)) void init ()
+{
+ int i;
+ for (i = 0; i < N; ++i) {
+ cb[i] = 3 * i - 2048;
+ cc[i] = -5 * i + 93;
+ cd[i] = i + 14;
+ }
+}
+
+int main ()
+{
+ int i;
+ init ();
+ foo ();
+ for (i = 0; i < N; ++i)
+ if (ca[i] != (-3 * i - 1969) >> 3)
+ abort ();
+ if (x != ca[N-1])
+ abort ();
+ return 0;
+}
Index: gcc/testsuite/gcc.target/powerpc/swaps-p8-6.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/powerpc/swaps-p8-6.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/powerpc/swaps-p8-6.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,32 @@
+/* { dg-do run { target { powerpc64le-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
+/* { dg-options "-mcpu=power8 -O3" } */
+
+void abort();
+
+#define N 16
+
+signed char ca[N] __attribute__((aligned(16)));
+signed char cb[] __attribute__((aligned(16)))
+ = {8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7};
+signed char cc[] __attribute__((aligned(16)))
+ = {1, 1, 2, 2, 3, 3, 2, 2, 1, 1, 0, 0, -1, -1, -2, -2};
+
+__attribute__((noinline)) void foo ()
+{
+ int i;
+ for (i = 0; i < N; i++) {
+ ca[i] = cb[i] - cc[i];
+ }
+}
+
+int main ()
+{
+ signed char cd[] = {7, 6, 4, 3, 1, 0, 0, -1, -1, -2, -2, -3, -3, -4, -4, -5};
+ int i;
+ foo ();
+ for (i = 0; i < N; ++i)
+ if (ca[i] != cd[i])
+ abort ();
+ return 0;
+}
Index: gcc/testsuite/gcc.target/powerpc/vsx-vectorize-2.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/powerpc/vsx-vectorize-2.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/powerpc/vsx-vectorize-2.c (.../branches/gcc-4_8-branch)
@@ -58,7 +58,7 @@
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" {xfail {! vect_hw_misalign } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" {xfail { {! vect_hw_misalign } || powerpc*-*-* } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 4 "vect" {xfail {! vect_hw_misalign } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 4 "vect" {xfail { {! vect_hw_misalign } || powerpc*-*-* } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.target/powerpc/swaps-p8-7.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/powerpc/swaps-p8-7.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/powerpc/swaps-p8-7.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,38 @@
+/* { dg-do run { target { powerpc64le-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
+/* { dg-options "-mcpu=power8 -O3" } */
+
+void abort ();
+
+#define N 256
+signed char ca[N] __attribute__((aligned(16)));
+signed char cb[N] __attribute__((aligned(16)));
+signed char cc[N] __attribute__((aligned(16)));
+
+__attribute__((noinline)) void foo ()
+{
+ int i;
+ for (i = 0; i < N; i++) {
+ ca[i] = cb[i] - cc[i];
+ }
+}
+
+__attribute__((noinline)) void init ()
+{
+ int i;
+ for (i = 0; i < N; ++i) {
+ cb[i] = i - 128;
+ cc[i] = i/2 - 64;
+ }
+}
+
+int main ()
+{
+ int i;
+ init ();
+ foo ();
+ for (i = 0; i < N; ++i)
+ if (ca[i] != i - i/2 - 64)
+ abort ();
+ return 0;
+}
Index: gcc/testsuite/gcc.target/powerpc/swaps-p8-15.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/powerpc/swaps-p8-15.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/powerpc/swaps-p8-15.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,51 @@
+/* { dg-do compile { target { powerpc64le-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
+/* { dg-options "-mcpu=power8 -O3" } */
+/* { dg-final { scan-assembler "lxvd2x" } } */
+/* { dg-final { scan-assembler "stxvd2x" } } */
+/* { dg-final { scan-assembler "xxspltw" } } */
+
+/* Currently the analyze_swaps phase cannot optimize this loop because
+ of the presence of an UNSPEC_VSX_CVDPSPN. At such time as this is
+ handled, we need to add a 'scan-assembler-not "xxpermdi"' directive to
+ this test. */
+#include <altivec.h>
+void abort();
+
+#define N 4096
+#define M 10000000
+vector float ca[N][4] = {0};
+vector float cb[N][4] = {0};
+vector float cc[N][4] = {0};
+
+__attribute__((noinline)) void foo ()
+{
+ int i;
+ for (i = 0; i < N; i++) {
+ cc[i][0] = vec_mul(vec_splats(cb[i][0][0]), ca[i][0]);
+ cc[i][0] = vec_madd(cc[i][0],vec_splats(cb[i][0][1]), ca[i][1]);
+ cc[i][0] = vec_madd(cc[i][0],vec_splats(cb[i][0][2]), ca[i][2]);
+ cc[i][0] = vec_madd(cc[i][0],vec_splats(cb[i][0][3]), ca[i][3]);
+
+ cc[i][1] = vec_mul(vec_splats(cb[i][1][0]), ca[i][0]);
+ cc[i][1] = vec_madd(cc[i][0],vec_splats(cb[i][1][1]), ca[i][1]);
+ cc[i][1] = vec_madd(cc[i][0],vec_splats(cb[i][1][2]), ca[i][2]);
+ cc[i][1] = vec_madd(cc[i][0],vec_splats(cb[i][1][3]), ca[i][3]);
+
+ cc[i][2] = vec_mul(vec_splats(cb[i][2][0]), ca[i][0]);
+ cc[i][2] = vec_madd(cc[i][0],vec_splats(cb[i][2][1]), ca[i][1]);
+ cc[i][2] = vec_madd(cc[i][0],vec_splats(cb[i][2][2]), ca[i][2]);
+ cc[i][2] = vec_madd(cc[i][0],vec_splats(cb[i][2][3]), ca[i][3]);
+
+ cc[i][3] = vec_mul(vec_splats(cb[i][3][0]), ca[i][0]);
+ cc[i][3] = vec_madd(cc[i][0],vec_splats(cb[i][3][1]), ca[i][1]);
+ cc[i][3] = vec_madd(cc[i][0],vec_splats(cb[i][3][2]), ca[i][2]);
+ cc[i][3] = vec_madd(cc[i][0],vec_splats(cb[i][3][3]), ca[i][3]);
+ }
+}
+
+int main ()
+{
+ foo ();
+ return 0;
+}
Index: gcc/testsuite/gcc.target/powerpc/swaps-p8-8.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/powerpc/swaps-p8-8.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/powerpc/swaps-p8-8.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,40 @@
+/* { dg-do run { target { powerpc64le-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
+/* { dg-options "-mcpu=power8 -O3" } */
+
+void abort ();
+
+#define N 4096
+signed char ca[N] __attribute__((aligned(16)));
+signed char cb[N] __attribute__((aligned(16)));
+signed char cc[N] __attribute__((aligned(16)));
+
+__attribute__((noinline)) void foo ()
+{
+ int i;
+ for (i = 0; i < N; i++) {
+ ca[i] = cb[i] - cc[i];
+ }
+}
+
+__attribute__((noinline)) void init ()
+{
+ int i, ii;
+ for (i = 0, ii = 0; i < N; ++i, ii = (ii + 1) % 128) {
+ cb[i] = ii - 128;
+ cc[i] = ii/2 - 64;
+ }
+}
+
+int main ()
+{
+ int i, ii;
+ init ();
+ foo ();
+ for (i = 0; i < N; ++i) {
+ ii = i % 128;
+ if (ca[i] != ii - ii/2 - 64)
+ abort ();
+ }
+ return 0;
+}
Index: gcc/testsuite/gcc.target/powerpc/pr65456.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/powerpc/pr65456.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/powerpc/pr65456.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,65 @@
+/* { dg-do compile { target { powerpc64le-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc64le-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
+/* { dg-options "-mcpu=power8 -O3" } */
+
+/* Verify that swap optimization properly removes swaps for unaligned
+ vector stores. See PR65456. */
+
+typedef unsigned char UChar;
+typedef unsigned short UShort;
+typedef unsigned int UWord;
+
+typedef unsigned long SizeT;
+typedef unsigned long Addr;
+
+void *memmove(void *dst, const void *src, SizeT len)
+{
+ const Addr WS = sizeof(UWord);/* 8 or 4 */
+ const Addr WM = WS - 1;/* 7 or 3 */
+
+ /* Copying backwards. */
+ SizeT n = len;
+ Addr d = (Addr) dst;
+ Addr s = (Addr) src;
+
+ if (((s ^ d) & WM) == 0) {
+ /* s and d have same UWord alignment. */
+ /* Pull up to a UWord boundary. */
+ while ((s & WM) != 0 && n >= 1) {
+ *(UChar *) d = *(UChar *) s;
+ s += 1;
+ d += 1;
+ n -= 1;
+ }
+ /* Copy UWords. */
+ while (n >= WS) {
+ *(UWord *) d = *(UWord *) s;
+ s += WS;
+ d += WS;
+ n -= WS;
+ }
+ if (n == 0)
+ return dst;
+ }
+ if (((s | d) & 1) == 0) {
+ /* Both are 16-aligned; copy what we can thusly. */
+ while (n >= 2) {
+ *(UShort *) d = *(UShort *) s;
+ s += 2;
+ d += 2;
+ n -= 2;
+ }
+ }
+ /* Copy leftovers, or everything if misaligned. */
+ while (n >= 1) {
+ *(UChar *) d = *(UChar *) s;
+ s += 1;
+ d += 1;
+ n -= 1;
+ }
+
+ return dst;
+}
+
+/* { dg-final { scan-assembler-not "xxpermdi" } } */
+/* { dg-final { scan-assembler-not "xxswapd" } } */
Index: gcc/testsuite/gcc.target/powerpc/vsx-vectorize-4.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/powerpc/vsx-vectorize-4.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/powerpc/vsx-vectorize-4.c (.../branches/gcc-4_8-branch)
@@ -54,7 +54,7 @@
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" {xfail {! vect_hw_misalign } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" {xfail { {! vect_hw_misalign } || powerpc*-*-* } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 3 "vect" {xfail {! vect_hw_misalign } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 3 "vect" {xfail { {! vect_hw_misalign } || powerpc*-*-* } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.target/powerpc/swaps-p8-1.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/powerpc/swaps-p8-1.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/powerpc/swaps-p8-1.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,35 @@
+/* { dg-do compile { target { powerpc64le-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
+/* { dg-options "-mcpu=power8 -O3" } */
+/* { dg-final { scan-assembler "lxvd2x" } } */
+/* { dg-final { scan-assembler "stxvd2x" } } */
+/* { dg-final { scan-assembler-not "xxpermdi" } } */
+
+void abort();
+
+#define N 16
+
+signed char ca[N] __attribute__((aligned(16)));
+signed char cb[] __attribute__((aligned(16)))
+ = {8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7};
+signed char cc[] __attribute__((aligned(16)))
+ = {1, 1, 2, 2, 3, 3, 2, 2, 1, 1, 0, 0, -1, -1, -2, -2};
+
+__attribute__((noinline)) void foo ()
+{
+ int i;
+ for (i = 0; i < N; i++) {
+ ca[i] = cb[i] - cc[i];
+ }
+}
+
+int main ()
+{
+ signed char cd[] = {7, 6, 4, 3, 1, 0, 0, -1, -1, -2, -2, -3, -3, -4, -4, -5};
+ int i;
+ foo ();
+ for (i = 0; i < N; ++i)
+ if (ca[i] != cd[i])
+ abort ();
+ return 0;
+}
Index: gcc/testsuite/gcc.target/powerpc/crypto-builtin-2.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/powerpc/crypto-builtin-2.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/powerpc/crypto-builtin-2.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,36 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
+/* { dg-options "-O2 -mcpu=power8 -mno-crypto" } */
+
+void use_builtins_d (__vector unsigned long long *p, __vector unsigned long long *q, __vector unsigned long long *r, __vector unsigned long long *s)
+{
+ p[0] = __builtin_crypto_vcipher (q[0], r[0]); /* { dg-error "Builtin function __builtin_crypto_vcipher is not supported with the current options" } */
+ p[1] = __builtin_crypto_vcipherlast (q[1], r[1]); /* { dg-error "Builtin function __builtin_crypto_vcipherlast is not supported with the current options" } */
+ p[2] = __builtin_crypto_vncipher (q[2], r[2]); /* { dg-error "Builtin function __builtin_crypto_vncipher is not supported with the current options" } */
+ p[3] = __builtin_crypto_vncipherlast (q[3], r[3]); /* { dg-error "Builtin function __builtin_crypto_vncipherlast is not supported with the current options" } */
+ p[4] = __builtin_crypto_vpermxor (q[4], r[4], s[4]);
+ p[5] = __builtin_crypto_vpmsumd (q[5], r[5]);
+ p[6] = __builtin_crypto_vshasigmad (q[6], 1, 15); /* { dg-error "Builtin function __builtin_crypto_vshasigmad is not supported with the current options" } */
+ p[7] = __builtin_crypto_vsbox (q[7]); /* { dg-error "Builtin function __builtin_crypto_vsbox is not supported with the current options" } */
+}
+
+void use_builtins_w (__vector unsigned int *p, __vector unsigned int *q, __vector unsigned int *r, __vector unsigned int *s)
+{
+ p[0] = __builtin_crypto_vpermxor (q[0], r[0], s[0]);
+ p[1] = __builtin_crypto_vpmsumw (q[1], r[1]);
+ p[2] = __builtin_crypto_vshasigmaw (q[2], 1, 15); /* { dg-error "Builtin function __builtin_crypto_vshasigmaw is not supported with the current options" } */
+}
+
+void use_builtins_h (__vector unsigned short *p, __vector unsigned short *q, __vector unsigned short *r, __vector unsigned short *s)
+{
+ p[0] = __builtin_crypto_vpermxor (q[0], r[0], s[0]);
+ p[1] = __builtin_crypto_vpmsumh (q[1], r[1]);
+}
+
+void use_builtins_b (__vector unsigned char *p, __vector unsigned char *q, __vector unsigned char *r, __vector unsigned char *s)
+{
+ p[0] = __builtin_crypto_vpermxor (q[0], r[0], s[0]);
+ p[1] = __builtin_crypto_vpmsumb (q[1], r[1]);
+}
Index: gcc/testsuite/gcc.target/powerpc/swaps-p8-9.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/powerpc/swaps-p8-9.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/powerpc/swaps-p8-9.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,42 @@
+/* { dg-do run { target { powerpc64le-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
+/* { dg-options "-mcpu=power8 -O3" } */
+
+void abort ();
+
+#define N 4096
+int ca[N] __attribute__((aligned(16)));
+int cb[N] __attribute__((aligned(16)));
+int cc[N] __attribute__((aligned(16)));
+int cd[N] __attribute__((aligned(16)));
+
+__attribute__((noinline)) void foo ()
+{
+ int i;
+ for (i = 0; i < N; i++) {
+ ca[i] = (cb[i] + cc[i]) * cd[i];
+ }
+}
+
+__attribute__((noinline)) void init ()
+{
+ int i;
+ for (i = 0; i < N; ++i) {
+ cb[i] = 3 * i - 2048;
+ cc[i] = -5 * i + 93;
+ cd[i] = i % 2 ? 1 : -1;
+ }
+}
+
+int main ()
+{
+ int i;
+ init ();
+ foo ();
+ for (i = 0; i < N; ++i)
+ if (i % 2 == 1 && ca[i] != -2 * i - 1955)
+ abort ();
+ else if (i % 2 == 0 && ca[i] != 1955 + 2 * i)
+ abort ();
+ return 0;
+}
Index: gcc/testsuite/gcc.target/powerpc/swaps-p8-17.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/powerpc/swaps-p8-17.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/powerpc/swaps-p8-17.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,15 @@
+/* { dg-do compile { target { powerpc64le-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
+/* { dg-options "-mcpu=power8 -O1" } */
+/* { dg-final { scan-assembler "lxvd2x" } } */
+/* { dg-final { scan-assembler "xxpermdi" } } */
+
+/* Verify that we don't try to do permute removal in the presence of
+ vec_ste. This used to ICE. */
+#include <altivec.h>
+
+void f (void *p)
+{
+ vector unsigned int u32 = vec_vsx_ld (1, (const unsigned int *)p);
+ vec_ste (u32, 1, (unsigned int *)p);
+}
Index: gcc/testsuite/gcc.target/powerpc/htm-builtin-1.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/powerpc/htm-builtin-1.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/powerpc/htm-builtin-1.c (.../branches/gcc-4_8-branch)
@@ -1,7 +1,7 @@
-/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-do assemble { target { powerpc*-*-* } } } */
/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
/* { dg-require-effective-target powerpc_htm_ok } */
-/* { dg-options "-O2 -mhtm" } */
+/* { dg-options "-O2 -mhtm -save-temps" } */
/* { dg-final { scan-assembler-times "tbegin\\." 1 } } */
/* { dg-final { scan-assembler-times "tend\\." 2 } } */
@@ -10,7 +10,7 @@
/* { dg-final { scan-assembler-times "tabortdci\\." 1 } } */
/* { dg-final { scan-assembler-times "tabortwc\\." 1 } } */
/* { dg-final { scan-assembler-times "tabortwci\\." 2 } } */
-/* { dg-final { scan-assembler-times "tcheck\\." 1 } } */
+/* { dg-final { scan-assembler-times "tcheck" 1 } } */
/* { dg-final { scan-assembler-times "trechkpt\\." 1 } } */
/* { dg-final { scan-assembler-times "treclaim\\." 1 } } */
/* { dg-final { scan-assembler-times "tsr\\." 3 } } */
@@ -49,3 +49,4 @@
__builtin_set_tfhar (a[22]);
__builtin_set_tfiar (a[23]);
}
+/* { dg-final { cleanup-saved-temps } } */
Index: gcc/testsuite/gcc.target/powerpc/swaps-p8-10.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/powerpc/swaps-p8-10.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/powerpc/swaps-p8-10.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,42 @@
+/* { dg-do run { target { powerpc64le-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
+/* { dg-options "-mcpu=power8 -O3" } */
+
+void abort ();
+
+#define N 4096
+int ca[N] __attribute__((aligned(16)));
+int cb[N] __attribute__((aligned(16)));
+int cc[N] __attribute__((aligned(16)));
+int cd[N] __attribute__((aligned(16)));
+
+__attribute__((noinline)) void foo ()
+{
+ int i;
+ for (i = 0; i < N; i++) {
+ ca[i] = ((cb[i] + cc[i]) * cd[i]) >> 3;
+ }
+}
+
+__attribute__((noinline)) void init ()
+{
+ int i;
+ for (i = 0; i < N; ++i) {
+ cb[i] = 3 * i - 2048;
+ cc[i] = -5 * i + 93;
+ cd[i] = i % 2 ? 1 : -1;
+ }
+}
+
+int main ()
+{
+ int i;
+ init ();
+ foo ();
+ for (i = 0; i < N; ++i)
+ if (i % 2 == 1 && ca[i] != (-2 * i - 1955) >> 3)
+ abort ();
+ else if (i % 2 == 0 && ca[i] != (1955 + 2 * i) >> 3)
+ abort ();
+ return 0;
+}
Index: gcc/testsuite/gcc.target/powerpc/swaps-p8-18.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/powerpc/swaps-p8-18.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/powerpc/swaps-p8-18.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,35 @@
+/* { dg-do compile { target { powerpc64le-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
+/* { dg-options "-mcpu=power8 -O3" } */
+/* { dg-final { scan-assembler-not "xxpermdi" } } */
+
+/* This is a test for a specific convert-splat permute removal. */
+
+void compute (float*, float*, float*, int, int);
+double test (void);
+double gorp;
+
+int main (void)
+{
+ float X[10000], Y[256], Z[2000];
+ int i;
+ for (i = 0; i < 2500; i++)
+ compute (X, Y, Z, 256, 2000);
+ gorp = test ();
+}
+
+void compute(float *X, float *Y, float *Z, int m, int n)
+{
+ int i, j;
+ float w, *x, *y;
+
+ for (i = 0; i < n; i++)
+ {
+ w = 0.0;
+ x = X++;
+ y = Y;
+ for (j = 0; j < m; j++)
+ w += (*x++) * (*y++);
+ Z[i] = w;
+ }
+}
Index: gcc/testsuite/gcc.target/powerpc/vsx-vectorize-6.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/powerpc/vsx-vectorize-6.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/powerpc/vsx-vectorize-6.c (.../branches/gcc-4_8-branch)
@@ -58,7 +58,7 @@
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" {xfail {! vect_hw_misalign } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" {xfail { {! vect_hw_misalign } || powerpc*-*-* } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 4 "vect" {xfail {! vect_hw_misalign } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 4 "vect" {xfail { {! vect_hw_misalign } || powerpc*-*-* } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.target/powerpc/swaps-p8-3.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/powerpc/swaps-p8-3.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/powerpc/swaps-p8-3.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,43 @@
+/* { dg-do compile { target { powerpc64le-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
+/* { dg-options "-mcpu=power8 -O3" } */
+/* { dg-final { scan-assembler "lxvd2x" } } */
+/* { dg-final { scan-assembler "stxvd2x" } } */
+/* { dg-final { scan-assembler-not "xxpermdi" } } */
+
+void abort ();
+
+#define N 4096
+signed char ca[N] __attribute__((aligned(16)));
+signed char cb[N] __attribute__((aligned(16)));
+signed char cc[N] __attribute__((aligned(16)));
+
+__attribute__((noinline)) void foo ()
+{
+ int i;
+ for (i = 0; i < N; i++) {
+ ca[i] = cb[i] - cc[i];
+ }
+}
+
+__attribute__((noinline)) void init ()
+{
+ int i, ii;
+ for (i = 0, ii = 0; i < N; ++i, ii = (ii + 1) % 128) {
+ cb[i] = ii - 128;
+ cc[i] = ii/2 - 64;
+ }
+}
+
+int main ()
+{
+ int i, ii;
+ init ();
+ foo ();
+ for (i = 0; i < N; ++i) {
+ ii = i % 128;
+ if (ca[i] != ii - ii/2 - 64)
+ abort ();
+ }
+ return 0;
+}
Index: gcc/testsuite/gcc.target/powerpc/swaps-p8-11.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/powerpc/swaps-p8-11.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/powerpc/swaps-p8-11.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,53 @@
+/* { dg-do run { target { powerpc64le-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
+/* { dg-options "-mcpu=power8 -O3" } */
+
+#include <altivec.h>
+void abort ();
+
+#define N 4096
+int ca[N] __attribute__((aligned(16)));
+int cb[N] __attribute__((aligned(16)));
+int cc[N] __attribute__((aligned(16)));
+int cd[N] __attribute__((aligned(16)));
+int hey;
+
+__attribute__((noinline)) void foo ()
+{
+ int i;
+ vector int va, vb, vc, vd, tmp;
+ vector unsigned int threes = vec_splat_u32(3);
+ for (i = 0; i < N; i+=4) {
+ vb = vec_vsx_ld (0, &cb[i]);
+ vc = vec_vsx_ld (0, &cc[i]);
+ vd = vec_vsx_ld (0, &cd[i]);
+ tmp = vec_add (vb, vc);
+ tmp = vec_sub (tmp, vd);
+ tmp = vec_sra (tmp, threes);
+ hey = tmp[3];
+ vec_vsx_st (tmp, 0, &ca[i]);
+ }
+}
+
+__attribute__((noinline)) void init ()
+{
+ int i;
+ for (i = 0; i < N; ++i) {
+ cb[i] = 3 * i - 2048;
+ cc[i] = -5 * i + 93;
+ cd[i] = i + 14;
+ }
+}
+
+int main ()
+{
+ int i;
+ init ();
+ foo ();
+ for (i = 0; i < N; ++i)
+ if (ca[i] != (-3 * i - 1969) >> 3)
+ abort ();
+ if (hey != ca[N-1])
+ abort ();
+ return 0;
+}
Index: gcc/testsuite/gcc.target/powerpc/vsx-vectorize-7.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/powerpc/vsx-vectorize-7.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/powerpc/vsx-vectorize-7.c (.../branches/gcc-4_8-branch)
@@ -58,7 +58,7 @@
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" {xfail {! vect_hw_misalign } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" {xfail { {! vect_hw_misalign } || powerpc*-*-* } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 4 "vect" {xfail {! vect_hw_misalign } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 4 "vect" {xfail { {! vect_hw_misalign } || powerpc*-*-* } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.target/powerpc/pr65787.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/powerpc/pr65787.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/powerpc/pr65787.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,21 @@
+/* { dg-do compile { target { powerpc64le-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
+/* { dg-options "-mcpu=power8 -O3" } */
+/* { dg-final { scan-assembler "xxsldwi \[0-9\]*,\[0-9\]*,\[0-9\]*,3" } } */
+/* { dg-final { scan-assembler-not "xxpermdi" } } */
+
+/* This test verifies that a vector extract operand properly has its
+ lane changed by the swap optimization. Element 2 of LE corresponds
+ to element 1 of BE. When doublewords are swapped, this becomes
+ element 3 of BE, so we need to shift the vector left by 3 words
+ to be able to extract the correct value from BE element zero. */
+
+typedef float v4f32 __attribute__ ((__vector_size__ (16)));
+
+void foo (float);
+extern v4f32 x, y;
+
+int main() {
+ v4f32 z = x + y;
+ foo (z[2]);
+}
Index: gcc/testsuite/gcc.target/powerpc/swaps-p8-4.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/powerpc/swaps-p8-4.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/powerpc/swaps-p8-4.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,45 @@
+/* { dg-do compile { target { powerpc64le-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
+/* { dg-options "-mcpu=power8 -O3" } */
+/* { dg-final { scan-assembler "lxvd2x" } } */
+/* { dg-final { scan-assembler "stxvd2x" } } */
+/* { dg-final { scan-assembler-not "xxpermdi" } } */
+
+void abort ();
+
+#define N 4096
+int ca[N] __attribute__((aligned(16)));
+int cb[N] __attribute__((aligned(16)));
+int cc[N] __attribute__((aligned(16)));
+int cd[N] __attribute__((aligned(16)));
+
+__attribute__((noinline)) void foo ()
+{
+ int i;
+ for (i = 0; i < N; i++) {
+ ca[i] = (cb[i] + cc[i]) * cd[i];
+ }
+}
+
+__attribute__((noinline)) void init ()
+{
+ int i;
+ for (i = 0; i < N; ++i) {
+ cb[i] = 3 * i - 2048;
+ cc[i] = -5 * i + 93;
+ cd[i] = i % 2 ? 1 : -1;
+ }
+}
+
+int main ()
+{
+ int i;
+ init ();
+ foo ();
+ for (i = 0; i < N; ++i)
+ if (i % 2 == 1 && ca[i] != -2 * i - 1955)
+ abort ();
+ else if (i % 2 == 0 && ca[i] != 1955 + 2 * i)
+ abort ();
+ return 0;
+}
Index: gcc/testsuite/gcc.target/avr/torture/pr64452.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/avr/torture/pr64452.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/avr/torture/pr64452.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,34 @@
+/* { dg-do compile } */
+/* { dg-options "-std=c99" } */
+
+struct A
+{
+ char str[8];
+ void* v;
+};
+
+int varf (char* fmt, ...);
+
+void foo (struct A a, struct A b)
+{
+ varf ("%s%s", b.str, b.str);
+}
+
+long long x64;
+
+void foo2 (long long j0,
+ struct A a, struct A b, struct A c, struct A d,
+ struct A e, struct A f, struct A g, struct A h, struct A i,
+ long long j1)
+{
+ varf ("%s%s", i.str, i.str, x64, j1+j0);
+}
+
+
+void foo3 (long long j0,
+ struct A a, struct A b, struct A c, struct A d,
+ struct A e, struct A f, struct A g, struct A h, struct A i,
+ long long j1)
+{
+ varf ("%s%s", &i.str, &b.str, x64, j1+j0);
+}
Index: gcc/testsuite/gcc.target/i386/pr64409.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/i386/pr64409.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/i386/pr64409.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,6 @@
+/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-require-effective-target maybe_x32 } */
+/* { dg-options "-O0 -mx32" } */
+
+int a;
+int* __attribute__ ((ms_abi)) fn1 () { return &a; } /* { dg-error "X32 does not support ms_abi attribute" } */
Index: gcc/testsuite/gcc.target/i386/sse-14.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/i386/sse-14.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/i386/sse-14.c (.../branches/gcc-4_8-branch)
@@ -150,6 +150,8 @@
/* emmintrin.h */
test_2 (_mm_shuffle_pd, __m128d, __m128d, __m128d, 1)
+test_1 (_mm_bsrli_si128, __m128i, __m128i, 1)
+test_1 (_mm_bslli_si128, __m128i, __m128i, 1)
test_1 (_mm_srli_si128, __m128i, __m128i, 1)
test_1 (_mm_slli_si128, __m128i, __m128i, 1)
test_1 (_mm_extract_epi16, int, __m128i, 1)
Index: gcc/testsuite/gcc.target/i386/pr57003.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/i386/pr57003.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/i386/pr57003.c (.../branches/gcc-4_8-branch)
@@ -1,5 +1,5 @@
/* PR rtl-optimization/57003 */
-/* { dg-do run } */
+/* { dg-do run { target { ! x32 } } } */
/* { dg-options "-O2 -maccumulate-outgoing-args" } */
#define N 2001
Index: gcc/testsuite/gcc.target/i386/pr64387.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/i386/pr64387.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/i386/pr64387.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-vectorize -ffloat-store -mavx2" } */
+
+float x[256];
+
+double *
+foo (void)
+{
+ double *z = __builtin_malloc (sizeof (double) * 256);
+ int i;
+ for (i = 0; i < 256; ++i)
+ z[i] = x[i] + 1.0f;
+ foo ();
+ return 0;
+}
Index: gcc/testsuite/gcc.target/i386/sse-22.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/i386/sse-22.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/i386/sse-22.c (.../branches/gcc-4_8-branch)
@@ -88,6 +88,8 @@
#endif
#include <emmintrin.h>
test_2 (_mm_shuffle_pd, __m128d, __m128d, __m128d, 1)
+test_1 (_mm_bsrli_si128, __m128i, __m128i, 1)
+test_1 (_mm_bslli_si128, __m128i, __m128i, 1)
test_1 (_mm_srli_si128, __m128i, __m128i, 1)
test_1 (_mm_slli_si128, __m128i, __m128i, 1)
test_1 (_mm_extract_epi16, int, __m128i, 1)
@@ -219,6 +221,8 @@
test_1 ( _mm256_shuffle_epi32, __m256i, __m256i, 1)
test_1 ( _mm256_shufflehi_epi16, __m256i, __m256i, 1)
test_1 ( _mm256_shufflelo_epi16, __m256i, __m256i, 1)
+test_1 ( _mm256_bslli_epi128, __m256i, __m256i, 8)
+test_1 ( _mm256_bsrli_epi128, __m256i, __m256i, 8)
test_1 ( _mm256_slli_si256, __m256i, __m256i, 8)
test_1 ( _mm256_srli_si256, __m256i, __m256i, 8)
test_2 ( _mm_blend_epi32, __m128i, __m128i, __m128i, 1)
Index: gcc/testsuite/gcc.target/i386/pr60516.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/i386/pr60516.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/i386/pr60516.c (.../branches/gcc-4_8-branch)
@@ -1,5 +1,5 @@
/* PR target/60516 */
-/* { dg-do compile } */
+/* { dg-do compile { target { ! x32 } } } */
/* { dg-options "-O2" } */
struct S { char c[65536]; };
Index: gcc/testsuite/gcc.target/i386/pr64513.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/i386/pr64513.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/i386/pr64513.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,17 @@
+/* PR target/64513 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -mstack-arg-probe" } */
+
+struct A {};
+struct B { struct A y; };
+int foo (struct A);
+
+int
+bar (int x)
+{
+ struct B b;
+ int c;
+ while (x--)
+ c = foo (b.y);
+ return c;
+}
Index: gcc/testsuite/gcc.target/s390/hotpatch-16.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/s390/hotpatch-16.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/s390/hotpatch-16.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,19 @@
+/* Functional tests for the function hotpatching feature. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch -mhotpatch=0,0" } */
+
+#include <stdio.h>
+
+__attribute__ ((hotpatch(1,2)))
+void hp1(void)
+{
+ printf("hello, world!\n");
+}
+
+/* Check number of occurences of certain instructions. */
+/* { dg-final { scan-assembler "pre-label.*(1 halfwords)" } } */
+/* { dg-final { scan-assembler "post-label.*(2 halfwords)" } } */
+/* { dg-final { scan-assembler-times "nopr\t%r7" 1 } } */
+/* { dg-final { scan-assembler-times "nop\t0" 1 } } */
+/* { dg-final { scan-assembler-not "brcl\t0, 0" } } */
Index: gcc/testsuite/gcc.target/s390/hotpatch-compile-1.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/s390/hotpatch-compile-1.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/s390/hotpatch-compile-1.c (.../branches/gcc-4_8-branch)
@@ -1,27 +1,5 @@
/* Functional tests for the function hotpatching feature. */
-/* { dg-do run } */
-/* { dg-options "-O3 -mzarch -mhotpatch" } */
-
-#include <stdio.h>
-
-void hp1(void)
-{
- printf("hello, world!\n");
-}
-
-inline void hp2(void)
-{
- printf("hello, world!\n");
-}
-
-__attribute__ ((always_inline))
-void hp3(void) /* { dg-warning "always_inline function might not be inlinable" } */
-{
- printf("hello, world!\n");
-} /* { dg-warning "function 'hp3' with the 'always_inline' attribute is not hotpatchable" } */
-
-int main (void)
-{
- return 0;
-}
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch -mhotpatch=-1,0" } */
+/* { dg-error "arguments to .-mhotpatch=n,m. should be non-negative integers" "" { target *-*-* } 1 } */
Index: gcc/testsuite/gcc.target/s390/hotpatch-18.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/s390/hotpatch-18.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/s390/hotpatch-18.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,19 @@
+/* Functional tests for the function hotpatching feature. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch -mhotpatch=1,2 -mhotpatch=0,0" } */
+
+#include <stdio.h>
+
+void hp1(void)
+{
+ printf("hello, world!\n");
+}
+
+/* Check number of occurences of certain instructions. */
+/* { dg-final { scan-assembler-not "pre-label NOPs" } } */
+/* { dg-final { scan-assembler-not "post-label NOPs" } } */
+/* { dg-final { scan-assembler-not "nopr\t%r7" } } */
+/* { dg-final { scan-assembler-not "nop\t0" } } */
+/* { dg-final { scan-assembler-not "brcl\t0, 0" } } */
+/* { dg-final { scan-assembler-not "alignment for hotpatch" } } */
Index: gcc/testsuite/gcc.target/s390/hotpatch-compile-3.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/s390/hotpatch-compile-3.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/s390/hotpatch-compile-3.c (.../branches/gcc-4_8-branch)
@@ -1,27 +1,5 @@
/* Functional tests for the function hotpatching feature. */
-/* { dg-do run } */
-/* { dg-options "-O3 -mzarch -mhotpatch=1" } */
-
-#include <stdio.h>
-
-void hp1(void)
-{
- printf("hello, world!\n");
-}
-
-inline void hp2(void)
-{
- printf("hello, world!\n");
-}
-
-__attribute__ ((always_inline))
-void hp3(void) /* { dg-warning "always_inline function might not be inlinable" } */
-{
- printf("hello, world!\n");
-} /* { dg-warning "function 'hp3' with the 'always_inline' attribute is not hotpatchable" } */
-
-int main (void)
-{
- return 0;
-}
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch -mhotpatch=0" } */
+/* { dg-error "arguments to .-mhotpatch=n,m. should be non-negative integers" "" { target *-*-* } 1 } */
Index: gcc/testsuite/gcc.target/s390/hotpatch-compile-5.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/s390/hotpatch-compile-5.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/s390/hotpatch-compile-5.c (.../branches/gcc-4_8-branch)
@@ -1,28 +1,5 @@
/* Functional tests for the function hotpatching feature. */
/* { dg-do compile } */
-/* { dg-options "-O3 -mzarch -mhotpatch=1000000" } */
-
-#include <stdio.h>
-
-void hp1(void)
-{
- printf("hello, world!\n");
-}
-
-__attribute__ ((hotpatch(1000000)))
-void hp2(void)
-{
- printf("hello, world!\n");
-}
-
-__attribute__ ((hotpatch(1000001)))
-void hp3(void)
-{ /* { dg-error "requested 'hotpatch' attribute is not a non-negative integer constant or too large .max. 1000000." } */
- printf("hello, world!\n");
-}
-
-int main (void)
-{
- return 0;
-}
+/* { dg-options "-O3 -mzarch -mhotpatch=a,0" } */
+/* { dg-error "arguments to .-mhotpatch=n,m. should be non-negative integers" "" { target *-*-* } 1 } */
Index: gcc/testsuite/gcc.target/s390/hotpatch-compile-7.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/s390/hotpatch-compile-7.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/s390/hotpatch-compile-7.c (.../branches/gcc-4_8-branch)
@@ -1,68 +1,10 @@
/* Functional tests for the function hotpatching feature. */
-/* { dg-do run } */
-/* { dg-options "-O3 -mzarch -mno-hotpatch" } */
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch" } */
-#include <stdio.h>
-
-__attribute__ ((hotpatch))
-void hp1(void)
-{
- printf("hello, world!\n");
-}
-
-__attribute__ ((hotpatch))
-inline void hp2(void)
-{
- printf("hello, world!\n");
-}
-
-__attribute__ ((hotpatch))
-__attribute__ ((always_inline))
-void hp3(void) /* { dg-warning "always_inline function might not be inlinable" } */
-{
- printf("hello, world!\n");
-} /* { dg-warning "function 'hp3' with the 'always_inline' attribute is not hotpatchable" } */
-
-__attribute__ ((hotpatch(0)))
-void hp4(void)
-{
- printf("hello, world!\n");
-}
-
-__attribute__ ((hotpatch(0)))
-inline void hp5(void)
-{
- printf("hello, world!\n");
-}
-
-__attribute__ ((hotpatch(0)))
-__attribute__ ((always_inline))
-void hp6(void) /* { dg-warning "always_inline function might not be inlinable" } */
-{
- printf("hello, world!\n");
-} /* { dg-warning "function 'hp6' with the 'always_inline' attribute is not hotpatchable" } */
-
-__attribute__ ((hotpatch(1)))
-void hp7(void)
-{
- printf("hello, world!\n");
-}
-
-__attribute__ ((hotpatch(1)))
-inline void hp8(void)
-{
- printf("hello, world!\n");
-}
-
-__attribute__ ((hotpatch(1)))
-__attribute__ ((always_inline))
-void hp9(void) /* { dg-warning "always_inline function might not be inlinable" } */
-{
- printf("hello, world!\n");
-} /* { dg-warning "function 'hp9' with the 'always_inline' attribute is not hotpatchable" } */
-
+__attribute__((hotpatch(-1,0)))
int main (void)
-{
+{/* { dg-error "attribute is not a comma separated pair of non-negative integer constants or too large" } */
return 0;
}
Index: gcc/testsuite/gcc.target/s390/hotpatch-compile-9.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/s390/hotpatch-compile-9.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/s390/hotpatch-compile-9.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,10 @@
+/* Functional tests for the function hotpatching feature. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch" } */
+
+__attribute__((hotpatch(0)))
+int main (void)
+{/* { dg-error "wrong number of arguments specified" } */
+ return 0;
+}
Index: gcc/testsuite/gcc.target/s390/hotpatch-compile-10.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/s390/hotpatch-compile-10.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/s390/hotpatch-compile-10.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,10 @@
+/* Functional tests for the function hotpatching feature. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch" } */
+
+__attribute__((hotpatch(0,0,0)))
+int main (void)
+{/* { dg-error "wrong number of arguments specified" } */
+ return 0;
+}
Index: gcc/testsuite/gcc.target/s390/hotpatch-compile-12.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/s390/hotpatch-compile-12.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/s390/hotpatch-compile-12.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,12 @@
+/* Functional tests for the function hotpatching feature. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch" } */
+
+int a;
+
+__attribute__((hotpatch(0,a)))
+int main (void)
+{ /* { dg-error "attribute is not a comma separated pair of non-negative integer constants or too large" } */
+ return 0;
+}
Index: gcc/testsuite/gcc.target/s390/hotpatch-compile-14.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/s390/hotpatch-compile-14.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/s390/hotpatch-compile-14.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,11 @@
+/* Functional tests for the function hotpatching feature. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch -mhotpatch=1000001,1000000" } */
+
+viod main(void)
+{
+ return 0;
+}
+
+/* { dg-error "argument to .-mhotpatch=n,m. is too large" "" { target *-*-* } 1 } */
Index: gcc/testsuite/gcc.target/s390/hotpatch-compile-16.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/s390/hotpatch-compile-16.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/s390/hotpatch-compile-16.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,24 @@
+/* Functional tests for the function hotpatching feature. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch" } */
+
+typedef int (*fn_t)(void);
+
+fn_t hp1(void)
+{
+ __attribute__((hotpatch(0,0)))
+ int nested1(void)
+ { return 1; }
+
+ return nested1;
+}
+
+fn_t hp2(void)
+{
+ __attribute__ ((hotpatch(1,2)))
+ int nested2(void)
+ { return 2; }
+
+ return nested2;
+}
Index: gcc/testsuite/gcc.target/s390/hotpatch-21.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/s390/hotpatch-21.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/s390/hotpatch-21.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,14 @@
+/* Functional tests for the function hotpatching feature. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch -mhotpatch=0,1" } */
+
+#include <stdio.h>
+
+void __attribute__ ((aligned(512))) hp1(void)
+{
+ printf("hello, world!\n");
+}
+
+/* Check number of occurences of certain instructions. */
+/* { dg-final { scan-assembler-not "alignment for hotpatch" } } */
Index: gcc/testsuite/gcc.target/s390/hotpatch-23.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/s390/hotpatch-23.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/s390/hotpatch-23.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,14 @@
+/* Functional tests for the function hotpatching feature. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch -mhotpatch=0,1 -falign-functions=4096" } */
+
+#include <stdio.h>
+
+void __attribute__ ((aligned(2048))) hp1(void)
+{
+ printf("hello, world!\n");
+}
+
+/* Check number of occurences of certain instructions. */
+/* { dg-final { scan-assembler-not "alignment for hotpatch" } } */
Index: gcc/testsuite/gcc.target/s390/hotpatch-25.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/s390/hotpatch-25.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/s390/hotpatch-25.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,33 @@
+/* Functional tests for the function hotpatching feature. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch" } */
+
+typedef long (*fn_t)(void);
+
+__attribute__ ((hotpatch(1,2)))
+fn_t outer(void)
+{
+ __attribute__ ((hotpatch(4,8)))
+ long nested1(void)
+ {
+ __attribute__ ((hotpatch(16,32)))
+ long nested2(void)
+ {
+ return 2;
+ }
+ return (long)(void *)nested2;
+ }
+
+ return nested1;
+}
+
+/* { dg-final { scan-assembler "pre-label.*(1 halfwords)" } } */
+/* { dg-final { scan-assembler "pre-label.*(4 halfwords)" } } */
+/* { dg-final { scan-assembler "pre-label.*(16 halfwords)" } } */
+/* { dg-final { scan-assembler "post-label.*(2 halfwords)" } } */
+/* { dg-final { scan-assembler "post-label.*(8 halfwords)" } } */
+/* { dg-final { scan-assembler "post-label.*(32 halfwords)" } } */
+/* { dg-final { scan-assembler-times "alignment for hotpatch" 3 } } */
+/* { dg-final { scan-assembler-times "\.align\t8" 6 } } */
+/* { dg-final { scan-assembler "nopr.*\n.*nopr.*\n.*nopr.*\n.*nopr.*\n.*nopr.*\n.*nopr.*\n.*nopr.*\n.*nopr.*\n.*nopr.*\n.*nopr.*\n.*nopr.*\n.*nopr.*\n.*nopr.*\n.*nopr.*\n.*nopr.*\n.*nopr" } } */
Index: gcc/testsuite/gcc.target/s390/hotpatch-1.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/s390/hotpatch-1.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/s390/hotpatch-1.c (.../branches/gcc-4_8-branch)
@@ -1,7 +1,7 @@
/* Functional tests for the function hotpatching feature. */
-/* { dg-do run } */
-/* { dg-options "-O3 -mzarch -mhotpatch --save-temps" } */
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch" } */
#include <stdio.h>
@@ -10,11 +10,10 @@
printf("hello, world!\n");
}
-int main (void)
-{
- return 0;
-}
-
/* Check number of occurences of certain instructions. */
-/* { dg-final { scan-assembler-times "nopr\t%r7" 12 } } */
-/* { dg-final { scan-assembler-times "nop\t0" 1 } } */
+/* { dg-final { scan-assembler-not "pre-label NOPs" } } */
+/* { dg-final { scan-assembler-not "post-label NOPs" } } */
+/* { dg-final { scan-assembler-not "nopr\t%r7" } } */
+/* { dg-final { scan-assembler-not "nop\t0" } } */
+/* { dg-final { scan-assembler-not "brcl\t0, 0" } } */
+/* { dg-final { scan-assembler-not "alignment for hotpatch" } } */
Index: gcc/testsuite/gcc.target/s390/hotpatch-3.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/s390/hotpatch-3.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/s390/hotpatch-3.c (.../branches/gcc-4_8-branch)
@@ -1,7 +1,7 @@
/* Functional tests for the function hotpatching feature. */
-/* { dg-do run } */
-/* { dg-options "-O3 -mzarch -mhotpatch=0 --save-temps" } */
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch -mhotpatch=0,2" } */
#include <stdio.h>
@@ -10,11 +10,9 @@
printf("hello, world!\n");
}
-int main (void)
-{
- return 0;
-}
-
/* Check number of occurences of certain instructions. */
+/* { dg-final { scan-assembler-not "pre-label NOPs" } } */
+/* { dg-final { scan-assembler "post-label.*(2 halfwords)" } } */
/* { dg-final { scan-assembler-not "nopr\t%r7" } } */
/* { dg-final { scan-assembler-times "nop\t0" 1 } } */
+/* { dg-final { scan-assembler-not "brcl\t0, 0" } } */
Index: gcc/testsuite/gcc.target/s390/hotpatch-5.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/s390/hotpatch-5.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/s390/hotpatch-5.c (.../branches/gcc-4_8-branch)
@@ -1,21 +1,18 @@
/* Functional tests for the function hotpatching feature. */
-/* { dg-do run } */
-/* { dg-options "-O3 -mzarch -mhotpatch --save-temps" } */
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch -mhotpatch=0,4" } */
#include <stdio.h>
-__attribute__ ((hotpatch))
void hp1(void)
{
printf("hello, world!\n");
}
-int main (void)
-{
- return 0;
-}
-
/* Check number of occurences of certain instructions. */
-/* { dg-final { scan-assembler-times "nopr\t%r7" 12 } } */
-/* { dg-final { scan-assembler-times "nop\t0" 1 } } */
+/* { dg-final { scan-assembler-not "pre-label NOPs" } } */
+/* { dg-final { scan-assembler "post-label.*(4 halfwords)" } } */
+/* { dg-final { scan-assembler-times "nopr\t%r7" 1 } } */
+/* { dg-final { scan-assembler-not "nop\t0" } } */
+/* { dg-final { scan-assembler-times "brcl\t0, 0" 1 } } */
Index: gcc/testsuite/gcc.target/s390/hotpatch-7.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/s390/hotpatch-7.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/s390/hotpatch-7.c (.../branches/gcc-4_8-branch)
@@ -1,21 +1,18 @@
/* Functional tests for the function hotpatching feature. */
-/* { dg-do run } */
-/* { dg-options "-O3 -mzarch -mhotpatch --save-temps" } */
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch -mhotpatch=0,6" } */
#include <stdio.h>
-__attribute__ ((hotpatch(0)))
void hp1(void)
{
printf("hello, world!\n");
}
-int main (void)
-{
- return 0;
-}
-
/* Check number of occurences of certain instructions. */
+/* { dg-final { scan-assembler-not "pre-label NOPs" } } */
+/* { dg-final { scan-assembler "post-label.*(6 halfwords)" } } */
/* { dg-final { scan-assembler-not "nopr\t%r7" } } */
-/* { dg-final { scan-assembler-times "nop\t0" 1 } } */
+/* { dg-final { scan-assembler-not "nop\t0" } } */
+/* { dg-final { scan-assembler-times "brcl\t0, 0" 2 } } */
Index: gcc/testsuite/gcc.target/s390/hotpatch-9.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/s390/hotpatch-9.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/s390/hotpatch-9.c (.../branches/gcc-4_8-branch)
@@ -1,21 +1,18 @@
/* Functional tests for the function hotpatching feature. */
-/* { dg-do run } */
-/* { dg-options "-O3 -mzarch -mhotpatch=1 --save-temps" } */
+/* { dg-do compile { target { ! lp64 } } } */
+/* { dg-options "-O3 -mesa -march=g5 -mhotpatch=0,4" } */
#include <stdio.h>
-__attribute__ ((hotpatch(2)))
void hp1(void)
{
printf("hello, world!\n");
}
-int main (void)
-{
- return 0;
-}
-
/* Check number of occurences of certain instructions. */
-/* { dg-final { scan-assembler-times "nopr\t%r7" 2 } } */
-/* { dg-final { scan-assembler-times "nop\t0" 1 } } */
+/* { dg-final { scan-assembler-not "pre-label NOPs" } } */
+/* { dg-final { scan-assembler "post-label.*(4 halfwords)" } } */
+/* { dg-final { scan-assembler-not "nopr\t%r7" } } */
+/* { dg-final { scan-assembler-times "nop\t0" 2 } } */
+/* { dg-final { scan-assembler-not "brcl\t0, 0" } } */
Index: gcc/testsuite/gcc.target/s390/hotpatch-11.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/s390/hotpatch-11.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/s390/hotpatch-11.c (.../branches/gcc-4_8-branch)
@@ -1,7 +1,7 @@
/* Functional tests for the function hotpatching feature. */
-/* { dg-do run } */
-/* { dg-options "-O3 -mzarch -mhotpatch -mno-hotpatch --save-temps" } */
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch -mhotpatch=1,0" } */
#include <stdio.h>
@@ -10,11 +10,9 @@
printf("hello, world!\n");
}
-int main (void)
-{
- return 0;
-}
-
/* Check number of occurences of certain instructions. */
-/* { dg-final { scan-assembler-not "nopr\t%r7" } } */
+/* { dg-final { scan-assembler "pre-label.*(1 halfwords)" } } */
+/* { dg-final { scan-assembler-not "post-label NOPs" } } */
+/* { dg-final { scan-assembler-times "nopr\t%r7" 1 } } */
/* { dg-final { scan-assembler-not "nop\t0" } } */
+/* { dg-final { scan-assembler-not "brcl\t0, 0" } } */
Index: gcc/testsuite/gcc.target/s390/hotpatch-13.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/s390/hotpatch-13.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/s390/hotpatch-13.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,21 @@
+/* Functional tests for the function hotpatching feature. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch" } */
+
+#include <stdio.h>
+
+__attribute__ ((hotpatch(1,0)))
+void hp1(void)
+{
+ printf("hello, world!\n");
+}
+
+/* Check number of occurences of certain instructions. */
+/* { dg-final { scan-assembler "pre-label.*(1 halfwords)" } } */
+/* { dg-final { scan-assembler-not "post-label NOPs" } } */
+/* { dg-final { scan-assembler-times "nopr\t%r7" 1 } } */
+/* { dg-final { scan-assembler-not "nop\t0" } } */
+/* { dg-final { scan-assembler-not "brcl\t0, 0" } } */
+/* { dg-final { scan-assembler "alignment for hotpatch" } } */
+/* { dg-final { scan-assembler-times "\.align\t8" 2 } } */
Index: gcc/testsuite/gcc.target/s390/hotpatch-15.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/s390/hotpatch-15.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/s390/hotpatch-15.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,19 @@
+/* Functional tests for the function hotpatching feature. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch" } */
+
+#include <stdio.h>
+
+__attribute__ ((hotpatch(1,2)))
+void hp1(void)
+{
+ printf("hello, world!\n");
+}
+
+/* Check number of occurences of certain instructions. */
+/* { dg-final { scan-assembler "pre-label.*(1 halfwords)" } } */
+/* { dg-final { scan-assembler "post-label.*(2 halfwords)" } } */
+/* { dg-final { scan-assembler-times "nopr\t%r7" 1 } } */
+/* { dg-final { scan-assembler-times "nop\t0" 1 } } */
+/* { dg-final { scan-assembler-not "brcl\t0, 0" } } */
Index: gcc/testsuite/gcc.target/s390/hotpatch-17.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/s390/hotpatch-17.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/s390/hotpatch-17.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,20 @@
+/* Functional tests for the function hotpatching feature. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch -mhotpatch=1,2" } */
+
+#include <stdio.h>
+
+__attribute__ ((hotpatch(0,0)))
+void hp1(void)
+{
+ printf("hello, world!\n");
+}
+
+/* Check number of occurences of certain instructions. */
+/* { dg-final { scan-assembler-not "pre-label NOPs" } } */
+/* { dg-final { scan-assembler-not "post-label NOPs" } } */
+/* { dg-final { scan-assembler-not "nopr\t%r7" } } */
+/* { dg-final { scan-assembler-not "nop\t0" } } */
+/* { dg-final { scan-assembler-not "brcl\t0, 0" } } */
+/* { dg-final { scan-assembler-not "alignment for hotpatch" } } */
Index: gcc/testsuite/gcc.target/s390/hotpatch-compile-2.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/s390/hotpatch-compile-2.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/s390/hotpatch-compile-2.c (.../branches/gcc-4_8-branch)
@@ -1,27 +1,5 @@
/* Functional tests for the function hotpatching feature. */
-/* { dg-do run } */
-/* { dg-options "-O3 -mzarch -mhotpatch=0" } */
-
-#include <stdio.h>
-
-void hp1(void)
-{
- printf("hello, world!\n");
-}
-
-inline void hp2(void)
-{
- printf("hello, world!\n");
-}
-
-__attribute__ ((always_inline))
-void hp3(void) /* { dg-warning "always_inline function might not be inlinable" } */
-{
- printf("hello, world!\n");
-} /* { dg-warning "function 'hp3' with the 'always_inline' attribute is not hotpatchable" } */
-
-int main (void)
-{
- return 0;
-}
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch -mhotpatch=0,-1" } */
+/* { dg-error "arguments to .-mhotpatch=n,m. should be non-negative integers" "" { target *-*-* } 1 } */
Index: gcc/testsuite/gcc.target/s390/hotpatch-19.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/s390/hotpatch-19.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/s390/hotpatch-19.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,25 @@
+/* Functional tests for the function hotpatching feature. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch -mhotpatch=1,2" } */
+
+#include <stdio.h>
+
+/* { dg-prune-output "always_inline function might not be inlinable" } */
+__attribute__ ((always_inline))
+static void hp2(void)
+{
+ printf("hello, world!\n");
+}
+
+void hp1(void)
+{
+ hp2();
+}
+
+/* Check number of occurences of certain instructions. */
+/* { dg-final { scan-assembler "pre-label.*(1 halfwords)" } } */
+/* { dg-final { scan-assembler "post-label.*(2 halfwords)" } } */
+/* { dg-final { scan-assembler-times "nopr\t%r7" 1 } } */
+/* { dg-final { scan-assembler-times "nop\t0" 1 } } */
+/* { dg-final { scan-assembler-not "brcl\t0, 0" } } */
Index: gcc/testsuite/gcc.target/s390/hotpatch-compile-4.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/s390/hotpatch-compile-4.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/s390/hotpatch-compile-4.c (.../branches/gcc-4_8-branch)
@@ -1,11 +1,5 @@
/* Functional tests for the function hotpatching feature. */
/* { dg-do compile } */
-/* { dg-options "-O3 -mzarch -mhotpatch=-1" } */
-
-int main (void)
-{
- return 0;
-}
-
-/* { dg-excess-errors "argument to '-mhotpatch=' should be a non-negative integer" } */
+/* { dg-options "-O3 -mzarch -mhotpatch=0,0,0" } */
+/* { dg-error "arguments to .-mhotpatch=n,m. should be non-negative integers" "" { target *-*-* } 1 } */
Index: gcc/testsuite/gcc.target/s390/hotpatch-compile-6.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/s390/hotpatch-compile-6.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/s390/hotpatch-compile-6.c (.../branches/gcc-4_8-branch)
@@ -1,11 +1,5 @@
/* Functional tests for the function hotpatching feature. */
/* { dg-do compile } */
-/* { dg-options "-O3 -mzarch -mhotpatch=1000001" } */
-
-int main (void)
-{
- return 0;
-}
-
-/* { dg-excess-errors "argument to '-mhotpatch=' is too large .max. 1000000." } */
+/* { dg-options "-O3 -mzarch -mhotpatch=0,a" } */
+/* { dg-error "arguments to .-mhotpatch=n,m. should be non-negative integers" "" { target *-*-* } 1 } */
Index: gcc/testsuite/gcc.target/s390/hotpatch-compile-8.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/s390/hotpatch-compile-8.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/s390/hotpatch-compile-8.c (.../branches/gcc-4_8-branch)
@@ -1,23 +1,10 @@
/* Functional tests for the function hotpatching feature. */
-/* { dg-do run } */
-/* { dg-options "-O3 -mzarch -mhotpatch" } */
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch" } */
-#include <stdio.h>
-
-int hp1(void)
-{
- int nested1(void) /* { dg-warning "hotpatching is not compatible with nested functions" } */
- { return 1; }
-
- __attribute__ ((hotpatch))
- int nested2(void) /* { dg-warning "hotpatching is not compatible with nested functions" } */
- { return 1; }
-
- return nested1() - nested2();
-}
-
+__attribute__((hotpatch(0,-1)))
int main (void)
-{
- return hp1();
+{/* { dg-error "attribute is not a comma separated pair of non-negative integer constants or too large" } */
+ return 0;
}
Index: gcc/testsuite/gcc.target/s390/hotpatch-compile-11.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/s390/hotpatch-compile-11.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/s390/hotpatch-compile-11.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,12 @@
+/* Functional tests for the function hotpatching feature. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch" } */
+
+int a;
+
+__attribute__((hotpatch(a,0)))
+int main (void)
+{ /* { dg-error "attribute is not a comma separated pair of non-negative integer constants or too large" } */
+ return 0;
+}
Index: gcc/testsuite/gcc.target/s390/hotpatch-compile-13.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/s390/hotpatch-compile-13.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/s390/hotpatch-compile-13.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,29 @@
+/* Functional tests for the function hotpatching feature. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch -mhotpatch=1000000,1000000" } */
+
+#include <stdio.h>
+
+void hp1(void)
+{
+ printf("hello, world!\n");
+}
+
+__attribute__ ((hotpatch(1000000,1000000)))
+void hp2(void)
+{
+ printf("hello, world!\n");
+}
+
+__attribute__ ((hotpatch(1000001,1000000)))
+void hp3(void)
+{ /* { dg-error " requested .hotpatch. attribute is not a comma separated pair" } */
+ printf("hello, world!\n");
+}
+
+__attribute__ ((hotpatch(1000000,1000001)))
+void hp4(void)
+{ /* { dg-error " requested .hotpatch. attribute is not a comma separated pair" } */
+ printf("hello, world!\n");
+}
Index: gcc/testsuite/gcc.target/s390/hotpatch-compile-15.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/s390/hotpatch-compile-15.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/s390/hotpatch-compile-15.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,43 @@
+/* Functional tests for the function hotpatching feature. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch" } */
+
+/* { dg-prune-output "always_inline function might not be inlinable" } */
+/* { dg-prune-output "called from here" } */
+
+#include <stdio.h>
+
+__attribute__ ((hotpatch(1,2)))
+static void hp1(void)
+{
+ printf("hello, world!\n");
+}
+
+__attribute__ ((hotpatch(1,2)))
+static inline void hp2(void)
+{
+ printf("hello, world!\n");
+}
+
+__attribute__ ((hotpatch(0,0)))
+__attribute__ ((always_inline))
+static void hp3(void)
+{
+ printf("hello, world!\n");
+}
+
+__attribute__ ((hotpatch(1,2)))
+__attribute__ ((always_inline))
+static void hp4(void)
+{
+ printf("hello, world!\n");
+}
+
+void main(void)
+{
+ hp1();
+ hp2();
+ hp3();
+ hp4();
+}
Index: gcc/testsuite/gcc.target/s390/htm-nofloat-1.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/s390/htm-nofloat-1.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/s390/htm-nofloat-1.c (.../branches/gcc-4_8-branch)
@@ -48,3 +48,4 @@
/* Make sure no FPR saves/restores are emitted. */
/* { dg-final { scan-assembler-not "\tstd\t" } } */
/* { dg-final { scan-assembler-not "\tld\t" } } */
+/* { dg-final { cleanup-saved-temps } } */
Index: gcc/testsuite/gcc.target/s390/hotpatch-20.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/s390/hotpatch-20.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/s390/hotpatch-20.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,20 @@
+/* Functional tests for the function hotpatching feature. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch" } */
+
+#include <stdio.h>
+
+/* { dg-prune-output "always_inline function might not be inlinable" } */
+__attribute__ ((hotpatch(1,2)))
+__attribute__ ((always_inline))
+static void hp2(void)
+{
+ printf("hello, world!\n");
+}
+
+/* { dg-prune-output "called from here" } */
+void hp1(void)
+{
+ hp2();
+}
Index: gcc/testsuite/gcc.target/s390/hotpatch-22.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/s390/hotpatch-22.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/s390/hotpatch-22.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,14 @@
+/* Functional tests for the function hotpatching feature. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch -mhotpatch=0,1 -falign-functions=1024" } */
+
+#include <stdio.h>
+
+void hp1(void)
+{
+ printf("hello, world!\n");
+}
+
+/* Check number of occurences of certain instructions. */
+/* { dg-final { scan-assembler-not "alignment for hotpatch" } } */
Index: gcc/testsuite/gcc.target/s390/hotpatch-24.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/s390/hotpatch-24.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/s390/hotpatch-24.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,14 @@
+/* Functional tests for the function hotpatching feature. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch -mhotpatch=0,1 -falign-functions=2048" } */
+
+#include <stdio.h>
+
+void __attribute__ ((aligned(4096))) hp1(void)
+{
+ printf("hello, world!\n");
+}
+
+/* Check number of occurences of certain instructions. */
+/* { dg-final { scan-assembler-not "alignment for hotpatch" } } */
Index: gcc/testsuite/gcc.target/s390/hotpatch-2.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/s390/hotpatch-2.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/s390/hotpatch-2.c (.../branches/gcc-4_8-branch)
@@ -1,7 +1,7 @@
/* Functional tests for the function hotpatching feature. */
-/* { dg-do run } */
-/* { dg-options "-O3 -mzarch -mhotpatch=1 --save-temps" } */
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch -mhotpatch=0,1" } */
#include <stdio.h>
@@ -10,11 +10,10 @@
printf("hello, world!\n");
}
-int main (void)
-{
- return 0;
-}
-
/* Check number of occurences of certain instructions. */
+/* { dg-final { scan-assembler-not "pre-label NOPs" } } */
+/* { dg-final { scan-assembler "post-label.*(1 halfwords)" } } */
/* { dg-final { scan-assembler-times "nopr\t%r7" 1 } } */
-/* { dg-final { scan-assembler-times "nop\t0" 1 } } */
+/* { dg-final { scan-assembler-not "nop\t0" } } */
+/* { dg-final { scan-assembler-not "brcl\t0, 0" } } */
+/* { dg-final { scan-assembler-not "alignment for hotpatch" } } */
Index: gcc/testsuite/gcc.target/s390/hotpatch-4.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/s390/hotpatch-4.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/s390/hotpatch-4.c (.../branches/gcc-4_8-branch)
@@ -1,26 +1,18 @@
/* Functional tests for the function hotpatching feature. */
-/* { dg-do run } */
-/* { dg-options "-O3 -mzarch -mhotpatch --save-temps" } */
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch -mhotpatch=0,3" } */
#include <stdio.h>
-inline void hp1(void)
+void hp1(void)
{
printf("hello, world!\n");
}
-__attribute__ ((always_inline))
-void hp2(void) /* { dg-warning "always_inline function might not be inlinable" } */
-{
- printf("hello, world!\n");
-} /* { dg-warning "function 'hp2' with the 'always_inline' attribute is not hotpatchable" } */
-
-int main (void)
-{
- return 0;
-}
-
/* Check number of occurences of certain instructions. */
+/* { dg-final { scan-assembler-not "pre-label NOPs" } } */
+/* { dg-final { scan-assembler "post-label.*(3 halfwords)" } } */
/* { dg-final { scan-assembler-not "nopr\t%r7" } } */
/* { dg-final { scan-assembler-not "nop\t0" } } */
+/* { dg-final { scan-assembler-times "brcl\t0, 0" 1 } } */
Index: gcc/testsuite/gcc.target/s390/hotpatch-6.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/s390/hotpatch-6.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/s390/hotpatch-6.c (.../branches/gcc-4_8-branch)
@@ -1,21 +1,18 @@
/* Functional tests for the function hotpatching feature. */
-/* { dg-do run } */
-/* { dg-options "-O3 -mzarch -mhotpatch --save-temps" } */
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch -mhotpatch=0,5" } */
#include <stdio.h>
-__attribute__ ((hotpatch(1)))
void hp1(void)
{
printf("hello, world!\n");
}
-int main (void)
-{
- return 0;
-}
-
/* Check number of occurences of certain instructions. */
-/* { dg-final { scan-assembler-times "nopr\t%r7" 1 } } */
+/* { dg-final { scan-assembler-not "pre-label NOPs" } } */
+/* { dg-final { scan-assembler "post-label.*(5 halfwords)" } } */
+/* { dg-final { scan-assembler-not "nopr\t%r7" } } */
/* { dg-final { scan-assembler-times "nop\t0" 1 } } */
+/* { dg-final { scan-assembler-times "brcl\t0, 0" 1 } } */
Index: gcc/testsuite/gcc.target/s390/hotpatch-8.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/s390/hotpatch-8.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/s390/hotpatch-8.c (.../branches/gcc-4_8-branch)
@@ -1,28 +1,19 @@
/* Functional tests for the function hotpatching feature. */
-/* { dg-do run } */
-/* { dg-options "-O3 -mzarch -mhotpatch --save-temps" } */
+/* { dg-do compile { target { ! lp64 } } } */
+/* { dg-options "-O3 -mesa -march=g5 -mhotpatch=0,3" } */
#include <stdio.h>
-__attribute__ ((hotpatch))
-inline void hp1(void)
+void hp1(void)
{
printf("hello, world!\n");
}
-__attribute__ ((hotpatch))
-__attribute__ ((always_inline))
-void hp2(void) /* { dg-warning "always_inline function might not be inlinable" } */
-{
- printf("hello, world!\n");
-} /* { dg-warning "function 'hp2' with the 'always_inline' attribute is not hotpatchable" } */
-
-int main (void)
-{
- return 0;
-}
-
/* Check number of occurences of certain instructions. */
-/* { dg-final { scan-assembler-not "nopr\t%r7" } } */
-/* { dg-final { scan-assembler-not "nop\t0" } } */
+/* { dg-final { scan-assembler-not "pre-label NOPs" } } */
+/* { dg-final { scan-assembler "post-label.*(3 halfwords)" } } */
+/* { dg-final { scan-assembler-times "nopr\t%r7" 1 } } */
+/* { dg-final { scan-assembler-times "nop\t0" 1 } } */
+/* { dg-final { scan-assembler-not "brcl\t0, 0" } } */
+/* { dg-final { scan-assembler-not "alignment for hotpatch" } } */
Index: gcc/testsuite/gcc.target/s390/hotpatch-10.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/s390/hotpatch-10.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/s390/hotpatch-10.c (.../branches/gcc-4_8-branch)
@@ -1,21 +1,19 @@
/* Functional tests for the function hotpatching feature. */
-/* { dg-do run } */
-/* { dg-options "-O3 -mzarch -mno-hotpatch --save-temps" } */
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch -mhotpatch=0,0" } */
#include <stdio.h>
-__attribute__ ((hotpatch(2)))
void hp1(void)
{
printf("hello, world!\n");
}
-int main (void)
-{
- return 0;
-}
-
/* Check number of occurences of certain instructions. */
-/* { dg-final { scan-assembler-times "nopr\t%r7" 2 } } */
-/* { dg-final { scan-assembler-times "nop\t0" 1 } } */
+/* { dg-final { scan-assembler-not "pre-label NOPs" } } */
+/* { dg-final { scan-assembler-not "post-label NOPs" } } */
+/* { dg-final { scan-assembler-not "nopr\t%r7" } } */
+/* { dg-final { scan-assembler-not "nop\t0" } } */
+/* { dg-final { scan-assembler-not "brcl\t0, 0" } } */
+/* { dg-final { scan-assembler-not "alignment for hotpatch" } } */
Index: gcc/testsuite/gcc.target/s390/hotpatch-12.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/s390/hotpatch-12.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/s390/hotpatch-12.c (.../branches/gcc-4_8-branch)
@@ -1,7 +1,7 @@
/* Functional tests for the function hotpatching feature. */
-/* { dg-do run } */
-/* { dg-options "-O3 -mzarch -mno-hotpatch -mhotpatch=1 --save-temps" } */
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch -mhotpatch=999,0" } */
#include <stdio.h>
@@ -10,11 +10,9 @@
printf("hello, world!\n");
}
-int main (void)
-{
- return 0;
-}
-
/* Check number of occurences of certain instructions. */
-/* { dg-final { scan-assembler-times "nopr\t%r7" 1 } } */
-/* { dg-final { scan-assembler-times "nop\t0" 1 } } */
+/* { dg-final { scan-assembler "pre-label.*(999 halfwords)" } } */
+/* { dg-final { scan-assembler-not "post-label NOPs" } } */
+/* { dg-final { scan-assembler-times "nopr\t%r7" 999 } } */
+/* { dg-final { scan-assembler-not "nop\t0" } } */
+/* { dg-final { scan-assembler-not "brcl\t0, 0" } } */
Index: gcc/testsuite/gcc.target/s390/hotpatch-14.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/s390/hotpatch-14.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/s390/hotpatch-14.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,20 @@
+/* Functional tests for the function hotpatching feature. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch" } */
+
+#include <stdio.h>
+
+__attribute__ ((hotpatch(0,2)))
+void hp1(void)
+{
+ printf("hello, world!\n");
+}
+
+/* Check number of occurences of certain instructions. */
+/* { dg-final { scan-assembler-not "pre-label NOPs" } } */
+/* { dg-final { scan-assembler "post-label.*(2 halfwords)" } } */
+/* { dg-final { scan-assembler-not "nopr\t%r7" } } */
+/* { dg-final { scan-assembler-times "nop\t0" 1 } } */
+/* { dg-final { scan-assembler-not "brcl\t0, 0" } } */
+/* { dg-final { scan-assembler-not "alignment for hotpatch" } } */
Index: gcc/testsuite/gcc.target/sh/pr53988.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/sh/pr53988.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.target/sh/pr53988.c (.../branches/gcc-4_8-branch)
@@ -5,9 +5,9 @@
/* { dg-do compile { target "sh*-*-*" } } */
/* { dg-options "-O1" } */
/* { dg-skip-if "" { "sh*-*-*" } { "-m5*"} { "" } } */
-/* { dg-final { scan-assembler-times "tst\tr" 8 } } */
-/* { dg-final { scan-assembler-not "tst\t#255" } } */
-/* { dg-final { scan-assembler-not "exts|extu|and|movu" } } */
+/* { dg-final { scan-assembler-times "tst\tr" 8 { xfail *-*-*} } } */
+/* { dg-final { scan-assembler-not "tst\t#255" { xfail *-*-*} } } */
+/* { dg-final { scan-assembler-not "exts|extu|and|movu" { xfail *-*-*} } } */
int
test00 (char* a, char* b, int c, int d)
Index: gcc/testsuite/lib/target-supports.exp
===================================================================
--- a/src/gcc/testsuite/lib/target-supports.exp (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/lib/target-supports.exp (.../branches/gcc-4_8-branch)
@@ -3674,6 +3674,7 @@
|| [istarget sparc*-*-*]
|| [istarget ia64-*-*]
|| [check_effective_target_arm_vect_no_misalign]
+ || ([istarget powerpc*-*-*] && [check_p8vector_hw_available])
|| ([istarget mips*-*-*]
&& [check_effective_target_mips_loongson]) } {
set et_vect_no_align_saved 1
@@ -3695,8 +3696,9 @@
} else {
set et_vect_hw_misalign_saved 0
if { ([istarget x86_64-*-*]
- || [istarget aarch64*-*-*]
- || [istarget i?86-*-*]) } {
+ || ([istarget powerpc*-*-*] && [check_p8vector_hw_available])
+ || [istarget aarch64*-*-*]
+ || [istarget i?86-*-*]) } {
set et_vect_hw_misalign_saved 1
}
}
@@ -5207,7 +5209,7 @@
lappend DEFAULT_VECTCFLAGS "-maltivec"
if [check_p8vector_hw_available] {
- lappend DEFAULT_VECTCFLAGS "-mpower8-vector" "-mno-allow-movmisalign"
+ lappend DEFAULT_VECTCFLAGS "-mpower8-vector"
} elseif [check_vsx_hw_available] {
lappend DEFAULT_VECTCFLAGS "-mvsx" "-mno-allow-movmisalign"
}
Index: gcc/testsuite/gfortran.dg/pointer_remapping_9.f90
===================================================================
--- a/src/gcc/testsuite/gfortran.dg/pointer_remapping_9.f90 (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gfortran.dg/pointer_remapping_9.f90 (.../branches/gcc-4_8-branch)
@@ -0,0 +1,31 @@
+! { dg-do run }
+!
+! PR fortran/61138
+! Wrong code with pointer-bounds remapping
+!
+! Contributed by Tobias Burnus <burnus@net-b.de>
+
+implicit none
+integer, target :: tgt(10)
+integer, target, allocatable :: tgt2(:)
+integer, pointer :: ptr(:)
+
+tgt = [1,2,3,4,5,6,7,8,9,10]
+tgt2 = [1,2,3,4,5,6,7,8,9,10]
+
+
+ptr(-5:) => tgt(5:) ! Okay
+
+if (size(ptr) /= 6 .or. lbound(ptr,1) /= -5) call abort()
+if (any (ptr /= [5,6,7,8,9,10])) call abort()
+
+
+ptr(-5:) => tgt2(5:) ! wrongly associates the whole array
+
+print '(*(i4))', size(ptr), lbound(ptr)
+print '(*(i4))', ptr
+
+if (size(ptr) /= 6 .or. lbound(ptr,1) /= -5) call abort()
+if (any (ptr /= [5,6,7,8,9,10])) call abort()
+end
+
Index: gcc/testsuite/gfortran.dg/entry_20.f90
===================================================================
--- a/src/gcc/testsuite/gfortran.dg/entry_20.f90 (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gfortran.dg/entry_20.f90 (.../branches/gcc-4_8-branch)
@@ -0,0 +1,148 @@
+! { dg-do compile }
+!
+! PR fortran/50898
+! A symbol was freed prematurely during resolution,
+! despite remaining reachable
+!
+! Original testcase from <shaojuncycle@gmail.com>
+
+MODULE MODULE_pmat2
+
+IMPLICIT NONE
+
+INTERFACE cad1b; MODULE PROCEDURE cad1b; END INTERFACE
+INTERFACE csb1b; MODULE PROCEDURE csb1b; END INTERFACE
+INTERFACE copbt; MODULE PROCEDURE copbt; END INTERFACE
+INTERFACE conbt; MODULE PROCEDURE conbt; END INTERFACE
+INTERFACE copmb; MODULE PROCEDURE copmb; END INTERFACE
+INTERFACE conmb; MODULE PROCEDURE conmb; END INTERFACE
+INTERFACE copbm; MODULE PROCEDURE copbm; END INTERFACE
+INTERFACE conbm; MODULE PROCEDURE conbm; END INTERFACE
+INTERFACE mulvb; MODULE PROCEDURE mulvb; END INTERFACE
+INTERFACE madvb; MODULE PROCEDURE madvb; END INTERFACE
+INTERFACE msbvb; MODULE PROCEDURE msbvb; END INTERFACE
+INTERFACE mulxb; MODULE PROCEDURE mulxb; END INTERFACE
+INTERFACE madxb; MODULE PROCEDURE madxb; END INTERFACE
+INTERFACE msbxb; MODULE PROCEDURE msbxb; END INTERFACE
+
+integer, parameter :: i_kind=4
+integer, parameter :: r_kind=4
+real(r_kind), parameter :: zero=0.0
+real(r_kind), parameter :: one=1.0
+real(r_kind), parameter :: two=2.0
+
+CONTAINS
+
+SUBROUTINE cad1b(a,m1,mah1,mah2,mirror2)
+implicit none
+INTEGER(i_kind), INTENT(IN ) :: m1,mah1,mah2,mirror2
+REAL(r_kind), INTENT(INOUT) :: a(0:m1-1,-mah1:mah2)
+RETURN
+ENTRY csb1b(a,m1,mah1,mah2,mirror2)
+END SUBROUTINE cad1b
+
+SUBROUTINE copbt(a,b,m1,m2,mah1,mah2)
+implicit none
+INTEGER(i_kind), INTENT(IN ) :: m1, m2, mah1, mah2
+REAL(r_kind), INTENT(IN ) :: a(m1,-mah1:mah2)
+REAL(r_kind), INTENT( OUT) :: b(m2,-mah2:mah1)
+RETURN
+ENTRY conbt(a,b,m1,m2,mah1,mah2)
+END SUBROUTINE copbt
+
+SUBROUTINE copmb(afull,aband,m1,m2,mah1,mah2)
+implicit none
+INTEGER(i_kind), INTENT(IN ) :: m1, m2, mah1, mah2
+REAL(r_kind), DIMENSION(m1,m2), INTENT(IN ) :: afull
+REAL(r_kind), DIMENSION(m1,-mah1:mah2),INTENT( OUT) :: aband
+RETURN
+ENTRY conmb(afull,aband,m1,m2,mah1,mah2)
+END SUBROUTINE copmb
+
+SUBROUTINE copbm(aband,afull,m1,m2,mah1,mah2)
+implicit none
+INTEGER(i_kind), INTENT(IN ) :: m1, m2, mah1, mah2
+REAL(r_kind), DIMENSION(m1,-mah1:mah2),INTENT(IN ) :: aband
+REAL(r_kind), DIMENSION(m1,m2), INTENT( OUT) :: afull
+RETURN
+ENTRY conbm(aband,afull,m1,m2,mah1,mah2)
+END SUBROUTINE copbm
+
+SUBROUTINE mulbb(a,b,c,m1,m2,mah1,mah2,mbh1,mbh2,mch1,mch2)
+implicit none
+INTEGER(i_kind), INTENT(IN ) :: m1, m2, mah1, mah2, mbh1, mbh2, mch1, mch2
+REAL(r_kind), INTENT(IN ) :: a(m1,-mah1:mah2), b(m2,-mbh1:mbh2)
+REAL(r_kind), INTENT(INOUT) :: c(m1,-mch1:mch2)
+INTEGER(i_kind) :: nch1, nch2, j, k, jpk, i1,i2
+c=zero
+ENTRY madbb(a,b,c,m1,m2,mah1,mah2,mbh1,mbh2,mch1,mch2)
+nch1=mah1+mbh1; nch2=mah2+mbh2
+IF(nch1 /= mch1 .OR. nch2 /= mch2)STOP 'In MULBB, dimensions inconsistent'
+DO j=-mah1,mah2
+ DO k=-mbh1,mbh2; jpk=j+k; i1=MAX(1,1-j); i2=MIN(m1,m2-j)
+ c(i1:i2,jpk)=c(i1:i2,jpk)+a(i1:i2,j)*b(j+i1:j+i2,k)
+ ENDDO
+ENDDO
+END SUBROUTINE mulbb
+
+SUBROUTINE MULVB(v1,a,v2, m1,m2,mah1,mah2)
+implicit none
+INTEGER(i_kind), INTENT(IN ) :: m1, m2, mah1, mah2
+REAL(r_kind), INTENT(IN ) :: v1(m1), a(m1,-mah1:mah2)
+REAL(r_kind), INTENT( OUT) :: v2(m2)
+INTEGER(i_kind) :: j, i1,i2
+v2=zero
+ENTRY madvb(v1,a,v2, m1,m2,mah1,mah2)
+DO j=-mah1,mah2; i1=MAX(1,1-j); i2=MIN(m1,m2-j)
+ v2(j+i1:j+i2)=v2(j+i1:j+i2)+v1(i1:i2)*a(i1:i2,j)
+ENDDO
+RETURN
+ENTRY msbvb(v1,a,v2, m1,m2,mah1,mah2)
+DO j=-mah1,mah2; i1=MAX(1,1-j); i2=MIN(m1,m2-j)
+ v2(j+i1:j+i2)=v2(j+i1:j+i2)-v1(i1:i2)*a(i1:i2,j)
+ENDDO
+END SUBROUTINE mulvb
+
+SUBROUTINE mulxb(v1,a,v2, m1,m2,mah1,mah2,my)
+implicit none
+INTEGER(i_kind), INTENT(IN ) :: m1, m2, mah1, mah2, my
+REAL(r_kind), INTENT(IN ) :: v1(m1,my), a(m1,-mah1:mah2)
+REAL(r_kind), INTENT( OUT) :: v2(m2,my)
+INTEGER(i_kind) :: i,j
+v2=zero
+ENTRY madxb(v1,a,v2, m1,m2,mah1,mah2,my)
+DO j=-mah1,mah2
+ DO i=MAX(1,1-j),MIN(m1,m2-j); v2(j+i,:)=v2(j+i,:)+v1(i,:)*a(i,j); ENDDO
+ENDDO
+RETURN
+ENTRY msbxb(v1,a,v2, m1,m2,mah1,mah2,my)
+DO j=-mah1,mah2
+ DO i=MAX(1,1-j),MIN(m1,m2-j); v2(j+i,:)=v2(j+i,:)-v1(i,:)*a(i,j); ENDDO
+ENDDO
+END SUBROUTINE mulxb
+
+SUBROUTINE mulyb(v1,a,v2, m1,m2,mah1,mah2,mx)
+implicit none
+INTEGER(i_kind), INTENT(IN ) :: m1, m2, mah1, mah2, mx
+REAL(r_kind), INTENT(IN ) :: v1(mx,m1), a(m1,-mah1:mah2)
+REAL(r_kind), INTENT( OUT) :: v2(mx,m2)
+INTEGER(i_kind) :: i,j
+v2=zero
+ENTRY madyb(v1,a,v2, m1,m2,mah1,mah2,mx)
+DO j=-mah1,mah2
+ DO i=MAX(1,1-j),MIN(m1,m2-j)
+ v2(:,j+i)=v2(:,j+i)+v1(:,i)*a(i,j)
+ ENDDO
+ENDDO
+RETURN
+ENTRY msbyb(v1,a,v2, m1,m2,mah1,mah2,mx)
+ DO j=-mah1,mah2
+ DO i=MAX(1,1-j),MIN(m1,m2-j)
+ v2(:,j+i)=v2(:,j+i)-v1(:,i)*a(i,j)
+ ENDDO
+ ENDDO
+RETURN
+END SUBROUTINE mulyb
+
+END MODULE MODULE_pmat2
+
Index: gcc/testsuite/gfortran.dg/pr64528.f90
===================================================================
--- a/src/gcc/testsuite/gfortran.dg/pr64528.f90 (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gfortran.dg/pr64528.f90 (.../branches/gcc-4_8-branch)
@@ -0,0 +1,20 @@
+! PR fortran/64528
+! { dg-do compile }
+! { dg-options "-O -fno-tree-dce -fno-tree-ccp" }
+
+program pr64528
+ interface
+ subroutine foo(x)
+ integer, value :: x
+ end subroutine foo
+ end interface
+ integer :: x
+ x = 10
+ call foo(x)
+ if(x .ne. 10) then
+ endif
+end program pr64528
+subroutine foo(x)
+ integer, value :: x
+ x = 11
+end subroutine foo
Index: gcc/testsuite/gfortran.dg/use_rename_8.f90
===================================================================
--- a/src/gcc/testsuite/gfortran.dg/use_rename_8.f90 (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gfortran.dg/use_rename_8.f90 (.../branches/gcc-4_8-branch)
@@ -0,0 +1,50 @@
+! { dg-do compile }
+!
+! PR fortran/63744
+! duplicate use rename used to be rejected when the target name
+! was that of the current program unit
+!
+! Original testcase from Roger Ferrer Ibanez <roger.ferrer@bsc.es>
+
+MODULE MOO
+ INTEGER :: A, B, C, D, E, F, G, H, I
+END MODULE MOO
+
+SUBROUTINE S
+ USE MOO, ONLY: X => A, X => A
+END SUBROUTINE S
+
+SUBROUTINE T
+ USE MOO, ONLY: X => B
+ USE MOO, ONLY: X => B
+END SUBROUTINE T
+
+SUBROUTINE C
+ USE MOO, ONLY: C ! { dg-error "is also the name of the current program unit" }
+END SUBROUTINE C
+
+SUBROUTINE D
+ USE MOO, ONLY: X => D
+END SUBROUTINE D
+
+SUBROUTINE E
+ USE MOO, ONLY: X => E, X => E
+END SUBROUTINE E
+
+SUBROUTINE F
+ USE MOO, ONLY: X => F
+ USE MOO, ONLY: X => F
+END SUBROUTINE F
+
+SUBROUTINE X
+ USE MOO, ONLY: X => G ! { dg-error "is also the name of the current program unit" }
+END SUBROUTINE X
+
+SUBROUTINE Y
+ USE MOO, ONLY: Y => H ! { dg-error "is also the name of the current program unit" }
+END SUBROUTINE Y
+
+SUBROUTINE Z
+ USE MOO, ONLY: Z => I, Z => I ! { dg-error "is also the name of the current program unit" }
+END SUBROUTINE Z
+
Index: gcc/testsuite/gfortran.dg/typebound_operator_20.f90
===================================================================
--- a/src/gcc/testsuite/gfortran.dg/typebound_operator_20.f90 (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gfortran.dg/typebound_operator_20.f90 (.../branches/gcc-4_8-branch)
@@ -0,0 +1,53 @@
+! { dg-do run }
+!
+! PR 63733: [4.8/4.9/5 Regression] [OOP] wrong resolution for OPERATOR generics
+!
+! Original test case from Alberto F. MartÃn Huertas <amartin@cimne.upc.edu>
+! Slightly modified by Salvatore Filippone <sfilippone@uniroma2.it>
+! Further modified by Janus Weil <janus@gcc.gnu.org>
+
+module overwrite
+ type parent
+ contains
+ procedure :: sum => sum_parent
+ generic :: operator(+) => sum
+ end type
+
+ type, extends(parent) :: child
+ contains
+ procedure :: sum => sum_child
+ end type
+
+contains
+
+ integer function sum_parent(op1,op2)
+ implicit none
+ class(parent), intent(in) :: op1, op2
+ sum_parent = 0
+ end function
+
+ integer function sum_child(op1,op2)
+ implicit none
+ class(child) , intent(in) :: op1
+ class(parent), intent(in) :: op2
+ sum_child = 1
+ end function
+
+end module
+
+program drive
+ use overwrite
+ implicit none
+
+ type(parent) :: m1, m2
+ class(parent), pointer :: mres
+ type(child) :: h1, h2
+ class(parent), pointer :: hres
+
+ if (m1 + m2 /= 0) call abort()
+ if (h1 + m2 /= 1) call abort()
+ if (h1%sum(h2) /= 1) call abort()
+
+end
+
+! { dg-final { cleanup-modules "overwrite" } }
Index: gcc/testsuite/gfortran.dg/typebound_call_26.f90
===================================================================
--- a/src/gcc/testsuite/gfortran.dg/typebound_call_26.f90 (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gfortran.dg/typebound_call_26.f90 (.../branches/gcc-4_8-branch)
@@ -0,0 +1,30 @@
+! { dg-do compile }
+!
+! PR 64244: [4.8/4.9/5 Regression] ICE at class.c:236 when using non_overridable
+!
+! Contributed by OndÅ™ej ÄŒertÃk <ondrej.certik@gmail.com>
+
+module m
+ implicit none
+
+ type :: A
+ contains
+ generic :: f => g
+ procedure, non_overridable :: g
+ end type
+
+contains
+
+ subroutine g(this)
+ class(A), intent(in) :: this
+ end subroutine
+
+end module
+
+
+program test_non_overridable
+ use m, only: A
+ implicit none
+ class(A), allocatable :: h
+ call h%f()
+end
Index: gcc/testsuite/gfortran.dg/unlimited_polymorphic_23.f90
===================================================================
--- a/src/gcc/testsuite/gfortran.dg/unlimited_polymorphic_23.f90 (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gfortran.dg/unlimited_polymorphic_23.f90 (.../branches/gcc-4_8-branch)
@@ -0,0 +1,35 @@
+! {dg-do run }
+!
+! Test the fix for PR65024, in which the structure for the 'info'
+! component of type 'T' was not being converted into TREE_SSA and
+! so caused an ICE in trans-expr.c:gfc_conv_component_ref.
+!
+! Reported by <matt@gneilson.plus.com>
+!
+MODULE X
+ TYPE T
+ CLASS(*), pointer :: info
+ END TYPE
+END MODULE
+
+PROGRAM P
+ call bug
+CONTAINS
+ SUBROUTINE BUG
+ USE X
+ CLASS(T), pointer :: e
+ integer, target :: i = 42
+ allocate(e)
+ e%info => NULL () ! used to ICE
+ if (.not.associated(e%info)) e%info => i ! used to ICE
+ select type (z => e%info)
+ type is (integer)
+ if (z .ne.i) call abort
+ end select
+ END SUBROUTINE
+
+ SUBROUTINE NEXT
+ USE X
+ CLASS (T), pointer :: e
+ END SUBROUTINE
+END
Index: gcc/testsuite/gfortran.dg/used_types_27.f90
===================================================================
--- a/src/gcc/testsuite/gfortran.dg/used_types_27.f90 (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gfortran.dg/used_types_27.f90 (.../branches/gcc-4_8-branch)
@@ -0,0 +1,18 @@
+! { dg-do compile }
+!
+! PR fortran/56674
+! PR fortran/58813
+! PR fortran/59016
+! PR fortran/59024
+! The generic name 'atomic_kind_types' was keeping pointers to freed
+! symbols, leading to random error-recovery ICEs.
+!
+! Original test case from Joost VandeVondele <Joost.VandeVondele@mat.ethz.ch>.
+
+MODULE atomic_kind_types
+ PUBLIC :: atomic_kind_type
+CONTAINS
+ INTEGER FUNCTION is_hydrogen(atomic_kind)
+ TYPE(atomic_kind_type), pointer :: atomic_kind ! { dg-error "used before it is defined" }
+ END FUNCTION
+END MODULE
Index: gcc/testsuite/gfortran.dg/dependency_45.f90
===================================================================
--- a/src/gcc/testsuite/gfortran.dg/dependency_45.f90 (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gfortran.dg/dependency_45.f90 (.../branches/gcc-4_8-branch)
@@ -0,0 +1,12 @@
+! { dg-do run }
+! { dg-options "-Warray-temporaries" }
+! PR 56867 - substrings were not checked for dependency.
+program main
+ character(len=4) :: a
+ character(len=4) :: c(3)
+ c(1) = 'abcd'
+ c(2) = '1234'
+ c(3) = 'wxyz'
+ c(:)(1:2) = c(2)(2:3) ! { dg-warning "array temporary" }
+ if (c(3) .ne. '23yz') call abort
+end program main
Index: gcc/testsuite/gfortran.dg/vect/vect-2.f90
===================================================================
--- a/src/gcc/testsuite/gfortran.dg/vect/vect-2.f90 (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gfortran.dg/vect/vect-2.f90 (.../branches/gcc-4_8-branch)
@@ -15,8 +15,8 @@
! support unaligned loads).
! { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" } }
-! { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 3 "vect" { xfail { vect_no_align || { ! vector_alignment_reachable } } } } }
-! { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { target { vect_no_align && { ! vector_alignment_reachable } } } } }
-! { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail { vect_no_align } } } }
-! { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 3 "vect" {target { vect_no_align || { { ! vector_alignment_reachable } && { ! vect_hw_misalign } } } } } }
+! { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 3 "vect" { xfail { { vect_no_align && { ! vect_hw_misalign } } || { ! vector_alignment_reachable } } } } }
+! { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { target { { vect_no_align && { ! vect_hw_misalign } } && { ! vector_alignment_reachable } } } } }
+! { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } }
+! { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 3 "vect" {target { { vect_no_align && { ! vect_hw_misalign } } || { { ! vector_alignment_reachable } && { ! vect_hw_misalign } } } } } }
! { dg-final { cleanup-tree-dump "vect" } }
Index: gcc/testsuite/gfortran.dg/vect/vect-3.f90
===================================================================
--- a/src/gcc/testsuite/gfortran.dg/vect/vect-3.f90 (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gfortran.dg/vect/vect-3.f90 (.../branches/gcc-4_8-branch)
@@ -6,10 +6,10 @@
Y = Y + A * X
END
-! { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 3 "vect" { target vect_no_align } } }
+! { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 3 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } }
! { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target { {! vect_no_align} && { {! vector_alignment_reachable} && {! vect_hw_misalign} } } } } }
! { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { target { {! vect_no_align} && { {! vector_alignment_reachable} && {! vect_hw_misalign} } } } } }
-! { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { vect_no_align || {! vector_alignment_reachable}} } } }
-! { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { { vect_no_align } || { ! vector_alignment_reachable} } } } }
+! { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { { vect_no_align && { ! vect_hw_misalign } } || {! vector_alignment_reachable}} } } }
+! { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { { vect_no_align && { ! vect_hw_misalign } } || { ! vector_alignment_reachable} } } } }
! { dg-final { cleanup-tree-dump "vect" } }
Index: gcc/testsuite/gfortran.dg/vect/vect-4.f90
===================================================================
--- a/src/gcc/testsuite/gfortran.dg/vect/vect-4.f90 (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gfortran.dg/vect/vect-4.f90 (.../branches/gcc-4_8-branch)
@@ -10,8 +10,8 @@
END
! { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } }
-! { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { { vect_no_align } || {! vector_alignment_reachable} } } } }
-! { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { { vect_no_align } || {! vector_alignment_reachable} } } } }
+! { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { { vect_no_align && { ! vect_hw_misalign } } || {! vector_alignment_reachable} } } } }
+! { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { { vect_no_align && { ! vect_hw_misalign } } || {! vector_alignment_reachable} } } } }
! { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { target { {! vector_alignment_reachable} && {! vect_hw_misalign} } } } }
! { dg-final { scan-tree-dump-times "accesses have the same alignment." 1 "vect" } }
! { dg-final { cleanup-tree-dump "vect" } }
Index: gcc/testsuite/gfortran.dg/vect/vect-5.f90
===================================================================
--- a/src/gcc/testsuite/gfortran.dg/vect/vect-5.f90 (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gfortran.dg/vect/vect-5.f90 (.../branches/gcc-4_8-branch)
@@ -36,8 +36,8 @@
end
! { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } }
-! { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { vect_no_align || {! vector_alignment_reachable} } } } }
-! { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align } } } }
-! { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 2 "vect" { target { vect_no_align } } } }
+! { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { { vect_no_align && { ! vect_hw_misalign } } || {! vector_alignment_reachable} } } } }
+! { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } }
+! { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 2 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } }
! { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target { {! vector_alignment_reachable} && {! vect_hw_misalign} } } } }
! { dg-final { cleanup-tree-dump "vect" } }
Index: gcc/testsuite/gfortran.dg/vect/pr32380.f
===================================================================
--- a/src/gcc/testsuite/gfortran.dg/vect/pr32380.f (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gfortran.dg/vect/pr32380.f (.../branches/gcc-4_8-branch)
@@ -259,5 +259,5 @@
return
end
-! { dg-final { scan-tree-dump-times "vectorized 6 loops" 1 "vect" { xfail powerpc*-*-* ia64-*-*-* } } }
+! { dg-final { scan-tree-dump-times "vectorized 6 loops" 1 "vect" { xfail { { powerpc*-*-* && { ! vect_hw_misalign } } || ia64-*-*-* } } } }
! { dg-final { cleanup-tree-dump "vect" } }
Index: gcc/testsuite/gcc.c-torture/execute/pr64979.c
===================================================================
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr64979.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr64979.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,36 @@
+/* PR target/64979 */
+
+#include <stdarg.h>
+
+void __attribute__((noinline, noclone))
+bar (int x, va_list *ap)
+{
+ if (ap)
+ {
+ int i;
+ for (i = 0; i < 10; i++)
+ if (i != va_arg (*ap, int))
+ __builtin_abort ();
+ if (va_arg (*ap, double) != 0.5)
+ __builtin_abort ();
+ }
+}
+
+void __attribute__((noinline, noclone))
+foo (int x, ...)
+{
+ va_list ap;
+ int n;
+
+ va_start (ap, x);
+ n = va_arg (ap, int);
+ bar (x, (va_list *) ((n == 0) ? ((void *) 0) : &ap));
+ va_end (ap);
+}
+
+int
+main ()
+{
+ foo (100, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0.5);
+ return 0;
+}
Index: gcc/testsuite/gcc.c-torture/compile/pr65163.c
===================================================================
--- a/src/gcc/testsuite/gcc.c-torture/compile/pr65163.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.c-torture/compile/pr65163.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,22 @@
+/* PR target/65163 */
+
+typedef unsigned int uint32_t;
+typedef unsigned short uint16_t;
+union unaligned_32 { uint32_t l; } __attribute__((packed));
+union unaligned_16 { uint16_t l; } __attribute__((packed));
+
+int
+test_00 (unsigned char* buf, int bits_per_component)
+{
+ (((union unaligned_32*)(buf))->l) =
+ __builtin_bswap32 (bits_per_component == 10 ? 1 : 0);
+ return 0;
+}
+
+int
+test_01 (unsigned char* buf, int bits_per_component)
+{
+ (((union unaligned_16*)(buf))->l) =
+ __builtin_bswap16 (bits_per_component == 10 ? 1 : 0);
+ return 0;
+}
Index: gcc/testsuite/gnat.dg/loop_optimization18_pkg.ads
===================================================================
--- a/src/gcc/testsuite/gnat.dg/loop_optimization18_pkg.ads (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gnat.dg/loop_optimization18_pkg.ads (.../branches/gcc-4_8-branch)
@@ -0,0 +1,15 @@
+with Unchecked_Conversion;
+
+package Loop_Optimization18_Pkg is
+
+ type Arr is array (Integer range <>) of Natural;
+
+ type Rec (UB : Integer) is record
+ L : Arr (1 .. UB);
+ end record;
+
+ type Byte_Array_Type is new String (1..4);
+
+ function Conv is new Unchecked_Conversion (Byte_Array_Type, Integer);
+
+end Loop_Optimization18_Pkg;
Index: gcc/testsuite/gnat.dg/loop_optimization18.adb
===================================================================
--- a/src/gcc/testsuite/gnat.dg/loop_optimization18.adb (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gnat.dg/loop_optimization18.adb (.../branches/gcc-4_8-branch)
@@ -0,0 +1,16 @@
+-- { dg-do compile }
+-- { dg-options "-O3" }
+
+package body Loop_Optimization18 is
+
+ procedure Proc (Message : Byte_Array_Type) is
+
+ R : Rec (Conv (Message));
+
+ begin
+ for Division in 1 .. R.UB loop
+ R.L (Division) := 0;
+ end loop;
+ end;
+
+end Loop_Optimization18;
Index: gcc/testsuite/gnat.dg/loop_optimization18.ads
===================================================================
--- a/src/gcc/testsuite/gnat.dg/loop_optimization18.ads (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gnat.dg/loop_optimization18.ads (.../branches/gcc-4_8-branch)
@@ -0,0 +1,7 @@
+with Loop_Optimization18_Pkg; use Loop_Optimization18_Pkg;
+
+package Loop_Optimization18 is
+
+ procedure Proc (Message : Byte_Array_Type);
+
+end Loop_Optimization18;
Index: gcc/testsuite/gcc.dg/pr61058.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/pr61058.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/pr61058.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,10 @@
+/* PR rtl-optimization/61058 */
+/* { dg-do compile } */
+/* { dg-options "" } */
+/* { dg-additional-options "-fno-asynchronous-unwind-tables -mtune=atom" { target i?86-*-* x86_64-*-* } } */
+
+void
+foo (void)
+{
+ __builtin_unreachable ();
+}
Index: gcc/testsuite/gcc.dg/vmx/extract-vsx.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vmx/extract-vsx.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vmx/extract-vsx.c (.../branches/gcc-4_8-branch)
@@ -10,7 +10,11 @@
vector double vd = {0.0, 1.0};
check (vec_extract (vl, 0) == 0, "vec_extract, vl, 0");
+ check (vec_extract (vl, 1) == 1, "vec_extract, vl, 1");
+ check (vec_extract (vd, 0) == 0.0, "vec_extract, vd, 0");
check (vec_extract (vd, 1) == 1.0, "vec_extract, vd, 1");
check (vl[0] == 0, "[], vl, 0");
- check (vd[1] == 1.0, "[], vd, 0");
+ check (vl[1] == 1, "[], vl, 1");
+ check (vd[0] == 0.0, "[], vd, 0");
+ check (vd[1] == 1.0, "[], vd, 1");
}
Index: gcc/testsuite/gcc.dg/pr63593.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/pr63593.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/pr63593.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fno-tree-vectorize" } */
+
+int in[2 * 4][4];
+int out[4];
+
+void
+foo (void)
+{
+ int sum;
+ int i, j, k;
+ for (k = 0; k < 4; k++)
+ {
+ sum = 1;
+ for (j = 0; j < 4; j++)
+ for (i = 0; i < 4; i++)
+ sum *= in[i + k][j];
+ out[k] = sum;
+ }
+}
Index: gcc/testsuite/gcc.dg/Warray-bounds-12.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/Warray-bounds-12.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/Warray-bounds-12.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,26 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -Warray-bounds" } */
+/* { dg-additional-options "-mssse3" { target x86_64-*-* i?86-*-* } } */
+
+void foo(short a[], short m)
+{
+ int i, j;
+ int f1[10];
+ short nc;
+
+ nc = m + 1;
+ if (nc > 3)
+ {
+ for (i = 0; i <= nc; i++)
+ {
+ f1[i] = f1[i] + 1;
+ }
+ }
+
+ for (i = 0, j = m; i < nc; i++, j--)
+ {
+ a[i] = f1[i]; /* { dg-bogus "above array bounds" } */
+ a[j] = i;
+ }
+ return;
+}
Index: gcc/testsuite/gcc.dg/pr64766.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/pr64766.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/pr64766.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,9 @@
+/* PR c/64766 */
+/* { dg-do compile } */
+
+void
+foo ()
+{
+}
+
+void foo () = 0; /* { dg-error "is initialized like a variable|invalid initializer" } */
Index: gcc/testsuite/gcc.dg/pr65063.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/pr65063.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/pr65063.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,33 @@
+/* { dg-do run } */
+/* { dg-options "-O3 -fno-tree-loop-ivcanon -fno-tree-vectorize" } */
+
+static int in[8][4];
+static int out[4];
+static const int check_result[] = {0, 16, 256, 4096};
+
+static inline void foo ()
+{
+ int sum;
+ int i, j, k;
+ for (k = 0; k < 4; k++)
+ {
+ sum = 1;
+ for (j = 0; j < 4; j++)
+ for (i = 0; i < 4; i++)
+ sum *= in[i + k][j];
+ out[k] = sum;
+ }
+}
+
+int main ()
+{
+ int i, j, k;
+ for (i = 0; i < 8; i++)
+ for (j = 0; j < 4; j++)
+ in[i][j] = (i + 2) / 3;
+ foo ();
+ for (k = 0; k < 4; k++)
+ if (out[k] != check_result[k])
+ __builtin_abort ();
+ return 0;
+}
Index: gcc/testsuite/gcc.dg/torture/pr64199.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/torture/pr64199.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/torture/pr64199.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-ffast-math -frounding-math" } */
+
+float
+foo (void)
+{
+ return 1.1f + 2.2f + 2.2f;
+}
Index: gcc/testsuite/gcc.dg/torture/pr64882.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/torture/pr64882.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/torture/pr64882.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,33 @@
+/* PR target/64882 */
+/* { dg-do compile } */
+
+int a, d, e;
+long long b;
+static long long *c = &b;
+
+void
+fn1 (short p)
+{
+}
+
+long long
+fn2 (long long p1, long long p2)
+{
+ return (p1 && p1 > 26854775807LL - p2) || p1 < -p2 ? p1 : p1 + p2;
+}
+
+void
+fn3 ()
+{
+ long long f;
+ int g = 3;
+ int *h = &a;
+ for (e = 0; e < 2; e++)
+ {
+ int *i = &g;
+ if (!fn2 (*c, 7 < d % (*i)--))
+ f = fn2 ((*h <= 0) | b, 5278350700LL);
+ *h = f;
+ fn1 (*h);
+ }
+}
Index: gcc/testsuite/gcc.dg/tree-ssa/stdarg-7.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/tree-ssa/stdarg-7.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/tree-ssa/stdarg-7.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,22 @@
+/* PR target/64979 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-stdarg" } */
+
+#include <stdarg.h>
+
+void bar (int x, va_list *ap);
+
+void
+foo (int x, ...)
+{
+ va_list ap;
+ int n;
+
+ va_start (ap, x);
+ n = va_arg (ap, int);
+ bar (x, (va_list *) ((n == 0) ? ((void *) 0) : &ap));
+ va_end (ap);
+}
+
+/* { dg-final { scan-tree-dump "foo: va_list escapes 1, needs to save all GPR units and all FPR units" "stdarg" } } */
+/* { dg-final { cleanup-tree-dump "stdarg" } } */
Index: gcc/testsuite/gcc.dg/pr64563.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/pr64563.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/pr64563.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,14 @@
+/* PR tree-optimization/64563 */
+/* { dg-do compile } */
+/* { dg-options "-Os -Wtype-limits" } */
+
+int a, b, c, d, f;
+unsigned int e;
+
+void
+foo (void)
+{
+ d = b = (a != (e | 4294967288UL));
+ if (!d)
+ c = f || b;
+}
Index: gcc/testsuite/gcc.dg/Warray-bounds-13.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/Warray-bounds-13.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/Warray-bounds-13.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -Warray-bounds" } */
+
+extern char *bar[17];
+
+int foo(int argc, char **argv)
+{
+ int i;
+ int n = 0;
+
+ for (i = 0; i < argc; i++)
+ n++;
+
+ for (i = 0; i < argc; i++)
+ argv[i] = bar[i + n]; /* { dg-bogus "above array bounds" } */
+
+ return 0;
+}
Index: gcc/testsuite/gcc.dg/vect/vect-105.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/vect-105.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-105.c (.../branches/gcc-4_8-branch)
@@ -66,7 +66,7 @@
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 2 "vect" { target vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 2 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { scan-tree-dump-times "possible dependence between data-refs" 0 "vect" } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/vect-75-big-array.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/vect-75-big-array.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-75-big-array.c (.../branches/gcc-4_8-branch)
@@ -52,6 +52,6 @@
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/vect-50.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/vect-50.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-50.c (.../branches/gcc-4_8-branch)
@@ -61,9 +61,9 @@
align the store will not force the two loads to be aligned). */
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail { vect_no_align } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { target vect_hw_misalign } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { vect_no_align || {! vector_alignment_reachable} } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 3 "vect" { target vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { { vect_no_align && { ! vect_hw_misalign } } || {! vector_alignment_reachable} } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 3 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target { {! vector_alignment_reachable} && { {! vect_no_align } && {! vect_hw_misalign } } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/vect-33.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/vect-33.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-33.c (.../branches/gcc-4_8-branch)
@@ -38,7 +38,7 @@
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" { target { ! vect_hw_misalign } } } } */
/* { dg-final { scan-tree-dump "Alignment of access forced using peeling" "vect" { target vector_alignment_reachable } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target { {! vector_alignment_reachable} && {! vect_hw_misalign} } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/vect-42.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/vect-42.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-42.c (.../branches/gcc-4_8-branch)
@@ -64,7 +64,7 @@
}
/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 3 "vect" { target vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 3 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target { { ! vector_alignment_reachable } && { ! vect_element_align } } } } } */
/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 4 "vect" { xfail { vect_no_align || { { ! vector_alignment_reachable } || vect_element_align } } } } } */
/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 3 "vect" { target vect_element_align } } } */
Index: gcc/testsuite/gcc.dg/vect/no-scevccp-outer-6-global.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/no-scevccp-outer-6-global.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/no-scevccp-outer-6-global.c (.../branches/gcc-4_8-branch)
@@ -52,5 +52,5 @@
return 0;
}
-/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED." 1 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED." 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/vect-outer-5.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/vect-outer-5.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-outer-5.c (.../branches/gcc-4_8-branch)
@@ -78,5 +78,5 @@
is known. */
/* { dg-final { scan-tree-dump-times "not vectorized: possible dependence between data-refs" 1 "vect" { xfail *-*-* } } } */
/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" } } */
-/* { dg-final { scan-tree-dump "zero step in outer loop." "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump "zero step in outer loop." "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-outer-fir.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-outer-fir.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-outer-fir.c (.../branches/gcc-4_8-branch)
@@ -67,5 +67,5 @@
return 0;
}
-/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 2 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 2 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-slp-33.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-slp-33.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-slp-33.c (.../branches/gcc-4_8-branch)
@@ -41,5 +41,5 @@
}
/* { dg-final { scan-tree-dump-times "vectorization not profitable" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" { target { ! vect_hw_misalign } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-31a.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-31a.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-31a.c (.../branches/gcc-4_8-branch)
@@ -47,5 +47,5 @@
}
/* { dg-final { scan-tree-dump-times "vectorization not profitable" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" { target { ! vect_hw_misalign } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-bb-slp-9a.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-bb-slp-9a.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-bb-slp-9a.c (.../branches/gcc-4_8-branch)
@@ -41,6 +41,6 @@
return 0;
}
-/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "slp" } } */
Index: gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-76b.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-76b.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-76b.c (.../branches/gcc-4_8-branch)
@@ -43,8 +43,8 @@
}
/* Peeling to align the store is used. Overhead of peeling is too high. */
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" { target vector_alignment_reachable } } } */
-/* { dg-final { scan-tree-dump-times "vectorization not profitable" 1 "vect" { target { vector_alignment_reachable && {! vect_no_align} } } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" { target { vector_alignment_reachable && {! vect_no_align} } } } } */
+/* { dg-final { scan-tree-dump-times "vectorization not profitable" 1 "vect" { target { vector_alignment_reachable && {! vect_hw_misalign} } } } } */
/* Versioning to align the store is used. Overhead of versioning is not too high. */
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_no_align || {! vector_alignment_reachable} } } } } */
Index: gcc/testsuite/gcc.dg/vect/vect-multitypes-6.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/vect-multitypes-6.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-multitypes-6.c (.../branches/gcc-4_8-branch)
@@ -61,7 +61,7 @@
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { sparc*-*-* && ilp32 } }} } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 6 "vect" { target vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 6 "vect" {xfail { vect_no_align } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 6 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 6 "vect" {xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/vect-60.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/vect-60.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-60.c (.../branches/gcc-4_8-branch)
@@ -68,7 +68,7 @@
return 0;
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail { vect_no_align || vect_element_align } } } } */
/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target { vect_element_align } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" { xfail { vect_element_align } } } } */
Index: gcc/testsuite/gcc.dg/vect/vect-52.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/vect-52.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-52.c (.../branches/gcc-4_8-branch)
@@ -56,7 +56,7 @@
(The store is aligned). */
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 2 "vect" { target vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 2 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/vect-44.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/vect-44.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-44.c (.../branches/gcc-4_8-branch)
@@ -65,8 +65,8 @@
two loads to be aligned). */
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail { vect_no_align } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { vect_no_align || {! vector_alignment_reachable} } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 3 "vect" { target vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { { vect_no_align && { ! vect_hw_misalign } } || {! vector_alignment_reachable} } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 3 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target { {! vector_alignment_reachable} && {{! vect_no_align} && {! vect_hw_misalign} } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/vect-27.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/vect-27.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-27.c (.../branches/gcc-4_8-branch)
@@ -43,8 +43,8 @@
}
/* The initialization induction loop (with aligned access) is also vectorized. */
-/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { xfail vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/bb-slp-24.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/bb-slp-24.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/bb-slp-24.c (.../branches/gcc-4_8-branch)
@@ -54,6 +54,8 @@
return 0;
}
-/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" { target vect_element_align } } } */
+/* Exclude POWER8 (only POWER cpu for which vect_element_align is true)
+ because loops have vectorized before SLP gets a shot. */
+/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" { target { vect_element_align && { ! powerpc*-*-* } } } } } */
/* { dg-final { cleanup-tree-dump "slp" } } */
Index: gcc/testsuite/gcc.dg/vect/vect-outer-fir-lb.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/vect-outer-fir-lb.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-outer-fir-lb.c (.../branches/gcc-4_8-branch)
@@ -74,5 +74,5 @@
return 0;
}
-/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 2 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 2 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/vect-outer-fir-big-array.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/vect-outer-fir-big-array.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-outer-fir-big-array.c (.../branches/gcc-4_8-branch)
@@ -70,5 +70,5 @@
return 0;
}
-/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 2 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 2 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/bb-slp-25.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/bb-slp-25.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/bb-slp-25.c (.../branches/gcc-4_8-branch)
@@ -54,6 +54,8 @@
return 0;
}
-/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" { target vect_element_align } } } */
+/* Exclude POWER8 (only POWER cpu for which vect_element_align is true)
+ because loops have vectorized before SLP gets a shot. */
+/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" { target { vect_element_align && { ! powerpc*-*-* } } } } } */
/* { dg-final { cleanup-tree-dump "slp" } } */
Index: gcc/testsuite/gcc.dg/vect/pr33804.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/pr33804.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/pr33804.c (.../branches/gcc-4_8-branch)
@@ -11,6 +11,6 @@
}
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
+/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/pr64493.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/pr64493.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/pr64493.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,31 @@
+/* { dg-do run } */
+
+#include "tree-vect.h"
+
+int a, b, c, d, e, f, g, h;
+
+int
+main ()
+{
+ check_vect ();
+
+ for (; a; a--)
+ for (d = 1; d <= 0; d++)
+ for (; d;)
+ if (h)
+ {
+ if (!g) __builtin_abort ();
+ if (!0) __builtin_abort ();
+ }
+
+ for (f = 4; f; f--)
+ {
+ for (b = 0; b < 2; b++)
+ c |= 1;
+ e |= c;
+ }
+
+ return 0;
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/vect-nest-cycle-1.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/vect-nest-cycle-1.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-nest-cycle-1.c (.../branches/gcc-4_8-branch)
@@ -43,6 +43,6 @@
return 0;
}
-/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/vect-77-alignchecks.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/vect-77-alignchecks.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-77-alignchecks.c (.../branches/gcc-4_8-branch)
@@ -49,8 +49,8 @@
both for the load and the store. */
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { target { {! vect_no_align} && { unaligned_stack && vector_alignment_reachable } } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target { { {! unaligned_stack} && vect_no_align } || {unaligned_stack && { {! vector_alignment_reachable} && {! vect_no_align} } } } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target { { {! unaligned_stack} && { vect_no_align && { ! vect_hw_misalign } } } || {unaligned_stack && { {! vector_alignment_reachable} && {! vect_no_align } } } } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 2 "vect" { target { { unaligned_stack && { vector_alignment_reachable && vect_no_align } } || {unaligned_stack && { {! vector_alignment_reachable} && vect_no_align } } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/vect-outer-3a-big-array.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/vect-outer-3a-big-array.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-outer-3a-big-array.c (.../branches/gcc-4_8-branch)
@@ -48,7 +48,7 @@
return 0;
}
-/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { scan-tree-dump-times "step doesn't divide the vector-size" 2 "vect" { target { ! vect_multiple_sizes } } } } */
/* { dg-final { scan-tree-dump-times "step doesn't divide the vector-size" 3 "vect" { target vect_multiple_sizes } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/no-vfa-vect-depend-1.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/no-vfa-vect-depend-1.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/no-vfa-vect-depend-1.c (.../branches/gcc-4_8-branch)
@@ -50,7 +50,7 @@
return main1 ();
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" {xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" {xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { scan-tree-dump-times "dependence distance negative" 1 "vect" } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/vect-29.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/vect-29.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-29.c (.../branches/gcc-4_8-branch)
@@ -50,7 +50,7 @@
/* The initialization induction loop (with aligned access) is also vectorized. */
/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" {target vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" {target { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/if-cvt-stores-vect-ifcvt-18.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/if-cvt-stores-vect-ifcvt-18.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/if-cvt-stores-vect-ifcvt-18.c (.../branches/gcc-4_8-branch)
@@ -65,5 +65,5 @@
return 0;
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { vect_no_align || { ! vect_strided2 } } } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { { vect_no_align && { ! vect_hw_misalign } } || { ! vect_strided2 } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/vect-72.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/vect-72.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-72.c (.../branches/gcc-4_8-branch)
@@ -45,7 +45,7 @@
return main1 ();
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/vect-nest-cycle-2.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/vect-nest-cycle-2.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-nest-cycle-2.c (.../branches/gcc-4_8-branch)
@@ -42,6 +42,6 @@
return 0;
}
-/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/bb-slp-9.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/bb-slp-9.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/bb-slp-9.c (.../branches/gcc-4_8-branch)
@@ -46,6 +46,6 @@
return 0;
}
-/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "slp" } } */
Index: gcc/testsuite/gcc.dg/vect/vect-56.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/vect-56.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-56.c (.../branches/gcc-4_8-branch)
@@ -67,7 +67,7 @@
return 0;
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail { vect_no_align || vect_element_align } } } } */
/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target { vect_element_align } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" { xfail { vect_element_align } } } } */
Index: gcc/testsuite/gcc.dg/vect/pr64495.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/pr64495.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/pr64495.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,35 @@
+/* { dg-do run } */
+
+#include <assert.h>
+#include "tree-vect.h"
+
+int a, b, c, d, e, f, g, i, j;
+static int *h = &e;
+
+int
+main ()
+{
+ check_vect ();
+
+ for (; a;)
+ for (; g; g++)
+ for (; f; f++)
+ if (j)
+ {
+ assert(b);
+ assert(0);
+ }
+ for (i = 24; i; i--)
+ {
+ for (c = 0; c < 6; c++)
+ d |= 1;
+ *h |= d;
+ }
+
+ if (e != 1)
+ __builtin_abort ();
+
+ return 0;
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/no-vfa-vect-43.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/no-vfa-vect-43.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/no-vfa-vect-43.c (.../branches/gcc-4_8-branch)
@@ -90,5 +90,5 @@
}
/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 2 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 6 "vect" { target vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 6 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/vect-outer-fir-lb-big-array.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/vect-outer-fir-lb-big-array.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-outer-fir-lb-big-array.c (.../branches/gcc-4_8-branch)
@@ -74,5 +74,5 @@
return 0;
}
-/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 2 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 2 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/vect-48.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/vect-48.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-48.c (.../branches/gcc-4_8-branch)
@@ -55,7 +55,7 @@
(The store is aligned). */
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 2 "vect" { target vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 2 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/vect-outer-fir.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/vect-outer-fir.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-outer-fir.c (.../branches/gcc-4_8-branch)
@@ -70,5 +70,5 @@
return 0;
}
-/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 2 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 2 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/vect-peel-3.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/vect-peel-3.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-peel-3.c (.../branches/gcc-4_8-branch)
@@ -47,7 +47,7 @@
return main1 ();
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { { vect_no_align } || {vect_sizes_32B_16B } } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { { vect_no_align } || {vect_sizes_32B_16B } } } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { { vect_no_align && { ! vect_hw_misalign } } || {vect_sizes_32B_16B } } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { { vect_no_align && { ! vect_hw_misalign } } || {vect_sizes_32B_16B } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/no-scevccp-outer-6.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/no-scevccp-outer-6.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/no-scevccp-outer-6.c (.../branches/gcc-4_8-branch)
@@ -51,6 +51,6 @@
return 0;
}
-/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED." 1 "vect" { xfail { unaligned_stack || vect_no_align } } } } */
+/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED." 1 "vect" { xfail { unaligned_stack || { vect_no_align && { ! vect_hw_misalign } } } } } } */
/* { dg-final { scan-tree-dump-times "vect_recog_widen_mult_pattern: detected" 1 "vect" { xfail *-*-* } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/no-vfa-vect-61.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/no-vfa-vect-61.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/no-vfa-vect-61.c (.../branches/gcc-4_8-branch)
@@ -73,5 +73,5 @@
return 0;
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/bb-slp-29.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/bb-slp-29.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/bb-slp-29.c (.../branches/gcc-4_8-branch)
@@ -54,6 +54,8 @@
return 0;
}
-/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" { target { vect_int_mult && vect_element_align } } } } */
+/* Exclude POWER8 (only POWER cpu for which vect_element_align is true)
+ because loops have vectorized before SLP gets a shot. */
+/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" { target { { vect_int_mult && vect_element_align } && { ! powerpc*-*-* } } } } } */
/* { dg-final { cleanup-tree-dump "slp" } } */
Index: gcc/testsuite/gcc.dg/vect/vect-peel-4.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/vect-peel-4.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-peel-4.c (.../branches/gcc-4_8-branch)
@@ -44,7 +44,7 @@
return main1 ();
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/vect-75.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/vect-75.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-75.c (.../branches/gcc-4_8-branch)
@@ -44,6 +44,6 @@
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/pr16105.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/pr16105.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/pr16105.c (.../branches/gcc-4_8-branch)
@@ -18,5 +18,5 @@
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 2 "vect" { target vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 2 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/pr61634.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/pr61634.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/pr61634.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+
+int a, b, c, d;
+short *e;
+void fn1 (int p1[], int p2, int p3[], int p4[], int p5[], int *p6)
+{
+ int f;
+ c = *p1;
+ d = *p5;
+ (void)p6;
+ for (; a; a--)
+ {
+ f = *e >> 2;
+ *e++ = f;
+ b += f * f;
+ f = *e >> 2;
+ *e++ = f;
+ }
+ p4[0] = p3[0];
+ for (;; p2--)
+ ;
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/vect-outer-3a.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/vect-outer-3a.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-outer-3a.c (.../branches/gcc-4_8-branch)
@@ -48,7 +48,7 @@
return 0;
}
-/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { scan-tree-dump-times "step doesn't divide the vector-size" 2 "vect" { target { ! vect_multiple_sizes } } } } */
/* { dg-final { scan-tree-dump-times "step doesn't divide the vector-size" 3 "vect" { target vect_multiple_sizes } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/slp-25.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/slp-25.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/slp-25.c (.../branches/gcc-4_8-branch)
@@ -56,5 +56,5 @@
/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */
/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail { vect_no_align || { ! vect_natural_alignment } } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail { { vect_no_align && { ! vect_hw_misalign } } || { ! vect_natural_alignment } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/vect-93.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/vect-93.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-93.c (.../branches/gcc-4_8-branch)
@@ -76,10 +76,10 @@
/* in main1: */
/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { target !powerpc*-*-* !i?86-*-* !x86_64-*-* } } } */
-/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { target vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
/* in main: */
-/* { dg-final { scan-tree-dump-times "vectorized 0 loops" 1 "vect" { target vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align } } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 0 loops" 1 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/vect-105-big-array.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/vect-105-big-array.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-105-big-array.c (.../branches/gcc-4_8-branch)
@@ -100,7 +100,7 @@
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 2 "vect" { target vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 2 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { scan-tree-dump-times "possible dependence between data-refs" 0 "vect" } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/vect-77-global.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/vect-77-global.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-77-global.c (.../branches/gcc-4_8-branch)
@@ -47,7 +47,7 @@
/* Requires versioning for aliasing. */
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/vect-pre-interact.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/vect-pre-interact.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-pre-interact.c (.../branches/gcc-4_8-branch)
@@ -12,5 +12,5 @@
res[i] = data[i] + data[i + 1];
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/vect-95.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/vect-95.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-95.c (.../branches/gcc-4_8-branch)
@@ -64,6 +64,6 @@
/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail { vect_no_align || vect_element_align} } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 2 "vect" { xfail { vect_no_align || vect_element_align } } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" { target vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 4 "vect" { target vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 4 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/vect-78-alignchecks.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/vect-78-alignchecks.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-78-alignchecks.c (.../branches/gcc-4_8-branch)
@@ -50,8 +50,8 @@
both for the load and the store. */
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { target { {! vect_no_align} && { unaligned_stack && vector_alignment_reachable } } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target { { {! unaligned_stack} && vect_no_align } || {unaligned_stack && { {! vector_alignment_reachable} && {! vect_no_align} } } } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target { { {! unaligned_stack} && { vect_no_align && { ! vect_hw_misalign } } } || {unaligned_stack && { {! vector_alignment_reachable} && { ! vect_no_align } } } } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 2 "vect" { target { { unaligned_stack && { vector_alignment_reachable && vect_no_align } } || {unaligned_stack && { {! vector_alignment_reachable} && vect_no_align } } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/vect-cselim-1.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/vect-cselim-1.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-cselim-1.c (.../branches/gcc-4_8-branch)
@@ -82,5 +82,5 @@
return 0;
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { vect_no_align || { ! vect_strided2 } } } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { { vect_no_align && { ! vect_hw_misalign } } || { ! vect_strided2 } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/no-vfa-vect-57.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/no-vfa-vect-57.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/no-vfa-vect-57.c (.../branches/gcc-4_8-branch)
@@ -71,5 +71,5 @@
return 0;
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/vect-cond-1.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/vect-cond-1.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-cond-1.c (.../branches/gcc-4_8-branch)
@@ -51,7 +51,7 @@
return 0;
}
-/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/vect-96.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/vect-96.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-96.c (.../branches/gcc-4_8-branch)
@@ -46,5 +46,5 @@
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target { {! vect_no_align} && vector_alignment_reachable } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { { vect_no_align } || { { ! vector_alignment_reachable} || vect_element_align } } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target { vect_no_align || { {! vector_alignment_reachable} && {! vect_element_align} } } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target { { vect_no_align && { ! vect_hw_misalign } } || { {! vector_alignment_reachable} && {! vect_element_align} } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/pr20122.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/pr20122.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/pr20122.c (.../branches/gcc-4_8-branch)
@@ -52,5 +52,5 @@
/* The loops in VecBug and VecBug2 require versioning for alignment.
The loop in main is aligned. */
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 3 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 2 "vect" { target vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 2 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/vect-multitypes-1.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/vect-multitypes-1.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-multitypes-1.c (.../branches/gcc-4_8-branch)
@@ -80,8 +80,8 @@
return 0;
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { xfail { vect_no_align } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail {{ vect_no_align } || {vect_sizes_32B_16B }}} } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 4 "vect" { xfail {{ vect_no_align } || {vect_sizes_32B_16B }}} } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail {{ vect_no_align && { ! vect_hw_misalign } } || {vect_sizes_32B_16B }}} } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 4 "vect" { xfail {{ vect_no_align && { ! vect_hw_misalign } } || {vect_sizes_32B_16B }}} } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/pr33953.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/pr33953.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/pr33953.c (.../branches/gcc-4_8-branch)
@@ -28,8 +28,8 @@
}
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" {xfail vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" {xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
+/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/vect-cond-3.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/vect-cond-3.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-cond-3.c (.../branches/gcc-4_8-branch)
@@ -59,7 +59,7 @@
return 0;
}
-/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/vect-78-global.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/vect-78-global.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-78-global.c (.../branches/gcc-4_8-branch)
@@ -47,7 +47,7 @@
(The store is aligned). */
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/vect-multitypes-3.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/vect-multitypes-3.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-multitypes-3.c (.../branches/gcc-4_8-branch)
@@ -54,7 +54,7 @@
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 3 "vect" { target vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 3 "vect" {xfail { vect_no_align } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 3 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 3 "vect" {xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/vect-cond-4.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/vect-cond-4.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-cond-4.c (.../branches/gcc-4_8-branch)
@@ -56,7 +56,7 @@
return 0;
}
-/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/vect/vect-multitypes-4.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/vect/vect-multitypes-4.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-multitypes-4.c (.../branches/gcc-4_8-branch)
@@ -91,7 +91,7 @@
return 0;
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { xfail { vect_no_align } } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" { target { vect_element_align} } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail { vect_no_align || vect_element_align } } } } */
/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 8 "vect" { xfail { vect_no_align || vect_element_align } } } } */
Index: gcc/testsuite/ChangeLog
===================================================================
--- a/src/gcc/testsuite/ChangeLog (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/ChangeLog (.../branches/gcc-4_8-branch)
@@ -1,3 +1,559 @@
+2015-04-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ Backport from mainline r222362
+ 2015-04-23 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ * gcc.target/powerpc/crypto-builtin-2.c: New.
+
+2015-04-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ Backport from mainline r222351
+ 2015-04-22 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ * gcc.target/powerpc/swaps-p8-18.c: New test.
+
+2015-04-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ Backport from mainline r222349
+ 2015-04-22 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ PR target/65456
+ * gcc.dg/vect/bb-slp-24.c: Exclude test for POWER8.
+ * gcc.dg/vect/bb-slp-25.c: Likewise.
+ * gcc.dg/vect/bb-slp-29.c: Likewise.
+ * gcc.dg/vect/bb-slp-9.c: Replace vect_no_align with
+ vect_no_align && { ! vect_hw_misalign }.
+ * gcc.dg/vect/costmodel/ppc/costmodel-slp-33.c: Exclude test for
+ vect_hw_misalign.
+ * gcc.dg/vect/costmodel/ppc/costmodel-vect-31a.c: Likewise.
+ * gcc.dg/vect/costmodel/ppc/costmodel-vect-76b.c: Adjust tests to
+ account for POWER8, where peeling for alignment is not needed.
+ * gcc.dg/vect/costmodel/ppc/costmodel-vect-outer-fir.c: Replace
+ vect_no_align with vect_no_align && { ! vect_hw_misalign }.
+ * gcc.dg.vect.if-cvt-stores-vect-ifcvt-18.c: Likewise.
+ * gcc.dg/vect/no-scevccp-outer-6-global.c: Likewise.
+ * gcc.dg/vect/no-scevccp-outer-6.c: Likewise.
+ * gcc.dg/vect/no-vfa-vect-43.c: Likewise.
+ * gcc.dg/vect/no-vfa-vect-57.c: Likewise.
+ * gcc.dg/vect/no-vfa-vect-61.c: Likewise.
+ * gcc.dg/vect/no-vfa-vect-depend-1.c: Likewise.
+ * gcc.dg/vect/pr16105.c: Likewise.
+ * gcc.dg/vect/pr20122.c: Likewise.
+ * gcc.dg/vect/pr33804.c: Likewise.
+ * gcc.dg/vect/pr33953.c: Likewise.
+ * gcc.dg/vect/slp-25.c: Likewise.
+ * gcc.dg/vect/vect-105-bit-array.c: Likewise.
+ * gcc.dg/vect/vect-105.c: Likewise.
+ * gcc.dg/vect/vect-27.c: Likewise.
+ * gcc.dg/vect/vect-29.c: Likewise.
+ * gcc.dg/vect/vect-33.c: Exclude unaligned access test for
+ POWER8.
+ * gcc.dg/vect/vect-42.c: Replace vect_no_align with vect_no_align
+ && { ! vect_hw_misalign }.
+ * gcc.dg/vect/vect-44.c: Likewise.
+ * gcc.dg/vect/vect-48.c: Likewise.
+ * gcc.dg/vect/vect-50.c: Likewise.
+ * gcc.dg/vect/vect-52.c: Likewise.
+ * gcc.dg/vect/vect-56.c: Likewise.
+ * gcc.dg/vect/vect-60.c: Likewise.
+ * gcc.dg/vect/vect-72.c: Likewise.
+ * gcc.dg/vect/vect-75-big-array.c: Likewise.
+ * gcc.dg/vect/vect-75.c: Likewise.
+ * gcc.dg/vect/vect-77-alignchecks.c: Likewise.
+ * gcc.dg/vect/vect-77-global.c: Likewise.
+ * gcc.dg/vect/vect-78-alignchecks.c: Likewise.
+ * gcc.dg/vect/vect-78-global.c: Likewise.
+ * gcc.dg/vect/vect-93.c: Likewise.
+ * gcc.dg/vect/vect-95.c: Likewise.
+ * gcc.dg/vect/vect-96.c: Likewise.
+ * gcc.dg/vect/vect-cond-1.c: Likewise.
+ * gcc.dg/vect/vect-cond-3.c: Likewise.
+ * gcc.dg/vect/vect-cond-4.c: Likewise.
+ * gcc.dg/vect/vect-cselim-1.c: Likewise.
+ * gcc.dg/vect/vect-multitypes-1.c: Likewise.
+ * gcc.dg/vect/vect-multitypes-3.c: Likewise.
+ * gcc.dg/vect/vect-multitypes-4.c: Likewise.
+ * gcc.dg/vect/vect-multitypes-6.c: Likewise.
+ * gcc.dg/vect/vect-nest-cycle-1.c: Likewise.
+ * gcc.dg/vect/vect-nest-cycle-2.c: Likewise.
+ * gcc.dg/vect/vect-outer-3a-big-array.c: Likewise.
+ * gcc.dg/vect/vect-outer-3a.c: Likewise.
+ * gcc.dg/vect/vect-outer-5.c: Likewise.
+ * gcc.dg/vect/vect-outer-fir-big-array.c: Likewise.
+ * gcc.dg/vect/vect-outer-fir-lb-big-array.c: Likewise.
+ * gcc.dg/vect/vect-outer-fir-lb.c: Likewise.
+ * gcc.dg/vect/vect-outer-fir.c: Likewise.
+ * gcc.dg/vect/vect-peel-3.c: Likewise.
+ * gcc.dg/vect/vect-peel-4.c: Likewise.
+ * gcc.dg/vect/vect-pre-interact.c: Likewise.
+ * gcc.target/powerpc/pr65456.c: New test.
+ * gcc.target/powerpc/vsx-vectorize-2.c: Exclude test for POWER8.
+ * gcc.target/powerpc/vsx-vectorize-4.c: Likewise.
+ * gcc.target/powerpc/vsx-vectorize-6.c: Likewise.
+ * gcc.target/powerpc/vsx-vectorize-7.c: Likewise.
+ * gfortran.dg/vect/vect-2.f90: Replace vect_no_align with
+ vect_no_align && { ! vect_hw_misalign }.
+ * gfortran.dg/vect/vect-3.f90: Likewise.
+ * gfortran.dg/vect/vect-4.f90: Likewise.
+ * gfortran.dg/vect/vect-5.f90: Likewise.
+ * lib/target-supports.exp (check_effective_target_vect_no_align):
+ Return 1 for POWER8.
+ (check_effective_target_vect_hw_misalign): Return 1 for POWER8.
+
+ Backport from mainline r222372
+ 2015-04-23 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ * gcc.dg/vect/costmodel/ppc/costmodel-bb-slp-9a.c: Replace
+ vect_no_align with vect_no_align && { ! vect_hw_misalign }.
+
+2015-04-18 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ Backport from mainline r222205
+ 2015-04-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ PR target/65787
+ * gcc.target/powerpc/pr65787.c: New.
+
+2015-04-14 Mikael Morin <mikael@gcc.gnu.org>
+
+ PR fortran/56674
+ PR fortran/58813
+ PR fortran/59016
+ PR fortran/59024
+ * gfortran.dg/used_types_27.f90: New.
+
+2015-03-31 Dominik Vogt <vogt@linux.vnet.ibm.com>
+
+ * gcc.target/s390/hotpatch-25.c: New test.
+ * gcc.target/s390/hotpatch-1.c: Update test.
+ * gcc.target/s390/hotpatch-10.c: Update test.
+ * gcc.target/s390/hotpatch-11.c: Update test.
+ * gcc.target/s390/hotpatch-12.c: Update test.
+ * gcc.target/s390/hotpatch-13.c: Update test.
+ * gcc.target/s390/hotpatch-14.c: Update test.
+ * gcc.target/s390/hotpatch-15.c: Update test.
+ * gcc.target/s390/hotpatch-16.c: Update test.
+ * gcc.target/s390/hotpatch-17.c: Update test.
+ * gcc.target/s390/hotpatch-18.c: Update test.
+ * gcc.target/s390/hotpatch-19.c: Update test.
+ * gcc.target/s390/hotpatch-2.c: Update test.
+ * gcc.target/s390/hotpatch-21.c: Update test.
+ * gcc.target/s390/hotpatch-22.c: Update test.
+ * gcc.target/s390/hotpatch-23.c: Update test.
+ * gcc.target/s390/hotpatch-24.c: Update test.
+ * gcc.target/s390/hotpatch-3.c: Update test.
+ * gcc.target/s390/hotpatch-4.c: Update test.
+ * gcc.target/s390/hotpatch-5.c: Update test.
+ * gcc.target/s390/hotpatch-6.c: Update test.
+ * gcc.target/s390/hotpatch-7.c: Update test.
+ * gcc.target/s390/hotpatch-8.c: Update test.
+ * gcc.target/s390/hotpatch-9.c: Update test.
+ * gcc.target/s390/hotpatch-compile-16.c: Update test.
+
+2015-03-31 Dominik Vogt <vogt@linux.vnet.ibm.com>
+
+ * gcc.target/s390/hotpatch-compile-16.c: Remove include of stdio.h.
+
+2015-03-26 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ Backport r214254 and related tests from mainline
+ * gcc.target/powerpc/swaps-p8-1.c: New test.
+ * gcc.target/powerpc/swaps-p8-3.c: New test.
+ * gcc.target/powerpc/swaps-p8-4.c: New test.
+ * gcc.target/powerpc/swaps-p8-5.c: New test.
+ * gcc.target/powerpc/swaps-p8-6.c: New test.
+ * gcc.target/powerpc/swaps-p8-7.c: New test.
+ * gcc.target/powerpc/swaps-p8-8.c: New test.
+ * gcc.target/powerpc/swaps-p8-9.c: New test.
+ * gcc.target/powerpc/swaps-p8-10.c: New test.
+ * gcc.target/powerpc/swaps-p8-11.c: New test.
+ * gcc.target/powerpc/swaps-p8-12.c: New test.
+ * gcc.target/powerpc/swaps-p8-13.c: New test.
+ * gcc.target/powerpc/swaps-p8-15.c: New test.
+ * gcc.target/powerpc/swaps-p8-17.c: New test.
+
+2015-03-26 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ * gcc.dg/vmx/extract-vsx.c: Add more cases.
+
+2015-03-21 Mikael Morin <mikael@gcc.gnu.org>
+
+ PR fortran/61138
+ * gfortran.dg/pointer_remapping_9.f90: New.
+
+2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
+
+ * testsuite/g++.dg/pr65049.C: New test.
+
+2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/loop_optimization18.ad[sb]: New test.
+ * gnat.dg/loop_optimization18_pkg.ads: New helper.
+
+2015-03-15 Paul Thomas <pault@gcc.gnu.org>
+
+ Backport from mainline
+ PR fortran/65024
+ * gfortran.dg/unlimited_polymorphic_23.f90: New test
+
+2015-03-12 Mikael Morin <mikael@gcc.gnu.org>
+
+ PR fortran/60898
+ * gfortran.dg/entry_20.f90: New.
+
+2015-03-12 Dominik Vogt <vogt@linux.vnet.ibm.com>
+
+ * gcc.target/s390/hotpatch-21.c: New test for hotpatch alignment.
+ * gcc.target/s390/hotpatch-22.c: Likewise.
+ * gcc.target/s390/hotpatch-23.c: Likewise.
+ * gcc.target/s390/hotpatch-24.c: Likewise.
+ * gcc.target/s390/hotpatch-2.c: Also check hotpatch alignment.
+ * gcc.target/s390/hotpatch-1.c: Update expected output.
+ * gcc.target/s390/hotpatch-2.c: Likewise.
+ * gcc.target/s390/hotpatch-3.c: Likewise.
+ * gcc.target/s390/hotpatch-4.c: Likewise.
+ * gcc.target/s390/hotpatch-5.c: Likewise.
+ * gcc.target/s390/hotpatch-6.c: Likewise.
+ * gcc.target/s390/hotpatch-7.c: Likewise.
+ * gcc.target/s390/hotpatch-8.c: Likewise.
+ * gcc.target/s390/hotpatch-9.c: Likewise.
+ * gcc.target/s390/hotpatch-10.c: Likewise.
+ * gcc.target/s390/hotpatch-11.c: Likewise.
+ * gcc.target/s390/hotpatch-12.c: Likewise.
+ * gcc.target/s390/hotpatch-13.c: Likewise.
+ * gcc.target/s390/hotpatch-14.c: Likewise.
+ * gcc.target/s390/hotpatch-15.c: Likewise.
+ * gcc.target/s390/hotpatch-16.c: Likewise.
+ * gcc.target/s390/hotpatch-17.c: Likewise.
+ * gcc.target/s390/hotpatch-18.c: Likewise.
+ * gcc.target/s390/hotpatch-19.c: Likewise.
+
+2015-03-12 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+
+ * gcc.target/s390/hotpatch-8.c: Remove -m31 and guard with ! lp64.
+ * gcc.target/s390/hotpatch-9.c: Likewise.
+
+2015-03-10 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/53988
+ * gcc.target/sh/pr53988.c: Mark tests as xfail.
+
+2015-03-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+ Backport from mainline
+ 2014-11-27 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+ PR target/59593
+ * gcc.target/arm/constant-pool.c: New test.
+
+2015-03-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+ PR target/64453
+ * gcc.target/arm/pr64453.c: New.
+
+2015-02-27 Richard Biener <rguenther@suse.de>
+
+ PR lto/65193
+ * g++.dg/lto/pr65193_0.C: New testcase.
+
+2015-02-26 Peter Bergner <bergner@vnet.ibm.com>
+
+ Backport from mainline
+ 2015-02-25 Peter Bergner <bergner@vnet.ibm.com>
+
+ * gcc.target/powerpc/htm-builtin-1.c (dg-do) Change to assemble.
+ (dg-options): Add -save-temps.
+ (dg-final): Add cleanup-saved-temps.
+
+ 2015-02-25 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
+
+ * gcc.target/powerpc/htm-builtin-1.c: Fix tcheck expect value.
+
+2015-02-26 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2014-11-27 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/61634
+ * gcc.dg/vect/pr61634.c: New testcase.
+
+2015-02-25 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2015-02-16 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/63593
+ * gcc.dg/pr63593.c: New testcase.
+
+ 2015-02-18 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/65063
+ * gcc.dg/pr65063.c: New testcase.
+
+2015-02-24 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2014-12-09 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/64199
+ * gcc.dg/torture/pr64199.c: New testcase.
+
+ 2015-01-14 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/64493
+ PR tree-optimization/64495
+ * gcc.dg/vect/pr64493.c: New testcase.
+ * gcc.dg/vect/pr64495.c: Likewise.
+
+2015-02-24 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2015-01-27 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/56273
+ PR tree-optimization/59124
+ PR tree-optimization/64277
+ * g++.dg/warn/Warray-bounds-6.C: New testcase.
+ * gcc.dg/Warray-bounds-12.c: Likewise.
+ * gcc.dg/Warray-bounds-13.c: Likewise.
+
+2015-02-24 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+
+ Backport from mainline
+ 2015-02-23 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+
+ * gcc.target/s390/hotpatch-1.c: Remove --save-temps option.
+ * gcc.target/s390/hotpatch-10.c: Remove --save-temps option.
+ * gcc.target/s390/hotpatch-11.c: Remove --save-temps option.
+ * gcc.target/s390/hotpatch-12.c: Remove --save-temps option.
+ * gcc.target/s390/hotpatch-13.c: Remove --save-temps option.
+ * gcc.target/s390/hotpatch-14.c: Remove --save-temps option.
+ * gcc.target/s390/hotpatch-15.c: Remove --save-temps option.
+ * gcc.target/s390/hotpatch-16.c: Remove --save-temps option.
+ * gcc.target/s390/hotpatch-17.c: Remove --save-temps option.
+ * gcc.target/s390/hotpatch-18.c: Remove --save-temps option.
+ * gcc.target/s390/hotpatch-19.c: Remove --save-temps option.
+ * gcc.target/s390/hotpatch-2.c: Remove --save-temps option.
+ * gcc.target/s390/hotpatch-20.c: Remove --save-temps option.
+ * gcc.target/s390/hotpatch-3.c: Remove --save-temps option.
+ * gcc.target/s390/hotpatch-4.c: Remove --save-temps option.
+ * gcc.target/s390/hotpatch-5.c: Remove --save-temps option.
+ * gcc.target/s390/hotpatch-6.c: Remove --save-temps option.
+ * gcc.target/s390/hotpatch-7.c: Remove --save-temps option.
+ * gcc.target/s390/hotpatch-8.c: Remove --save-temps option.
+ * gcc.target/s390/hotpatch-9.c: Remove --save-temps option.
+ * gcc.target/s390/htm-nofloat-1.c: Cleanup --save-temps files.
+
+2015-02-24 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+
+ Add testcases missing from hotpatch v2
+ * gcc/testsuite/gcc.target/s390/hotpatch-13.c
+ * gcc/testsuite/gcc.target/s390/hotpatch-15.c
+ * gcc/testsuite/gcc.target/s390/hotpatch-17.c
+ * gcc/testsuite/gcc.target/s390/hotpatch-19.c
+ * gcc/testsuite/gcc.target/s390/hotpatch-compile-11.c
+ * gcc/testsuite/gcc.target/s390/hotpatch-compile-13.c
+ * gcc/testsuite/gcc.target/s390/hotpatch-compile-15.c
+ * gcc/testsuite/gcc.target/s390/hotpatch-20.c
+ * gcc/testsuite/gcc.target/s390/hotpatch-compile-9.c
+ * gcc/testsuite/gcc.target/s390/hotpatch-14.c
+ * gcc/testsuite/gcc.target/s390/hotpatch-16.c
+ * gcc/testsuite/gcc.target/s390/hotpatch-18.c
+ * gcc/testsuite/gcc.target/s390/hotpatch-compile-10.c
+ * gcc/testsuite/gcc.target/s390/hotpatch-compile-12.c
+ * gcc/testsuite/gcc.target/s390/hotpatch-compile-14.c
+ * gcc/testsuite/gcc.target/s390/hotpatch-compile-16.c
+
+ Backport from mainline
+ 2015-02-23 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+
+ * gcc.target/s390/hotpatch-8.c: Add -march=g5.
+ * gcc.target/s390/hotpatch-9.c: Add -march=g5.
+ * gcc.target/s390/hotpatch-compile-1.c: Fix error message.
+ * gcc.target/s390/hotpatch-compile-10.c: Likewise.
+ * gcc.target/s390/hotpatch-compile-11.c: Likewise.
+ * gcc.target/s390/hotpatch-compile-12.c: Likewise.
+ * gcc.target/s390/hotpatch-compile-13.c: Likewise.
+ * gcc.target/s390/hotpatch-compile-14.c: Likewise.
+ * gcc.target/s390/hotpatch-compile-2.c: Likewise.
+ * gcc.target/s390/hotpatch-compile-3.c: Likewise.
+ * gcc.target/s390/hotpatch-compile-4.c: Likewise.
+ * gcc.target/s390/hotpatch-compile-5.c: Likewise.
+ * gcc.target/s390/hotpatch-compile-6.c: Likewise.
+ * gcc.target/s390/hotpatch-compile-7.c: Likewise.
+ * gcc.target/s390/hotpatch-compile-8.c: Likewise.
+ * gcc.target/s390/hotpatch-compile-9.c: Likewise.
+
+2015-02-23 Oleg Endo <olegendo@gcc.gnu.org>
+
+ Backport from mainline
+ 2015-02-23 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/65163
+ * gcc.c-torture/compile/pr65163.c: New.
+
+2015-02-20 Georg-Johann Lay <avr@gjlay.de>
+
+ Backport from 2015-02-20 trunk r220847.
+
+ PR target/64452
+ * gcc.target/avr/torture/pr64452.c: New test.
+
+2015-02-20 Uros Bizjak <ubizjak@gmail.com>
+
+ Backport from mainline
+ 2013-09-08 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * g++.dg/debug/ra1.C: New test.
+
+2015-02-17 Sandra Loosemore <sandra@codesourcery.com>
+
+ Backported from mainline
+ 2015-02-17 Sandra Loosemore <sandra@codesourcery.com>
+
+ * gcc.target/arm/divzero.c: New test case.
+
+2015-02-17 Ilya Tocar <ilya.tocar@intel.com>
+
+ Backport from mainline
+ 2015-01-14 Ilya Tocar <ilya.tocar@intel.com>
+
+ PR target/64387
+ * gcc.target/i386/pr64387.c: New test.
+
+2015-02-13 Mikael Morin <mikael@gcc.gnu.org>
+
+ PR fortran/63744
+ gfortran.dg/use_rename_8.f90: New.
+
+2015-02-12 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2015-02-09 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/64979
+ * gcc.dg/tree-ssa/stdarg-7.c: New test.
+ * gcc.c-torture/execute/pr64979.c: New test.
+
+2015-02-11 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2014-07-24 Marek Polacek <polacek@redhat.com>
+
+ PR c/57653
+ * c-c++-common/pr57653.c: New test.
+ * c-c++-common/pr57653.h: New file.
+ * c-c++-common/pr57653-2.c: New test.
+ * c-c++-common/pr57653-2.h: New file.
+
+2015-02-04 Uros Bizjak <ubizjak@gmail.com>
+
+ Backport from mainline
+ 2015-01-31 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/64882
+ * gcc.dg/torture/pr64882.c: New test.
+
+2015-02-01 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2015-01-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/61058
+ * gcc.dg/pr61058.c: New test.
+
+ PR c/64766
+ * gcc.dg/pr64766.c: New test.
+
+ 2015-01-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR fortran/64528
+ * gfortran.dg/pr64528.f90: New test.
+
+ 2015-01-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/64563
+ * gcc.dg/pr64563.c: New test.
+
+ PR target/64513
+ * gcc.target/i386/pr64513.c: New test.
+
+2015-01-29 Ilya Tocar <ilya.tocar@intel.com>
+
+ * gcc.target/i386/sse-14.c: Test new intrinsic.
+ * gcc.target/i386/sse-22.c: Ditto.
+
+2015-01-27 Mikael Pettersson <mikpelinux@gmail.com>
+
+ Backport from mainline
+
+ 2013-09-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ PR middle-end/57748
+ * gcc.dg/torture/pr57748-1.c: New test.
+ * gcc.dg/torture/pr57748-2.c: New test.
+
+ 2014-01-08 Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ PR middle-end/57748
+ * gcc.dg/torture/pr57748-3.c: New test.
+ * gcc.dg/torture/pr57748-4.c: New test.
+
+2015-01-24 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/56867
+ * gfortran.dg/dependency_45.f90: New test.
+
+2015-01-24 Thomas Koenig <tkoenig@netcologne.de>
+
+ Backport from trunk
+ PR fortran/57023
+ * gfortran.dg/internal_pack_15.f90: New test.
+
+2015-01-20 Marek Polacek <polacek@redhat.com>
+
+ Backport from mainline
+ 2014-06-23 Marek Polacek <polacek@redhat.com>
+
+ PR c/61553
+ * c-c++-common/pr61553.c: New test.
+
+2015-01-12 Janus Weil <janus@gcc.gnu.org>
+
+ Backport from mainline
+ PR fortran/63733
+ * gfortran.dg/typebound_operator_20.f90: New.
+
+2014-12-28 H.J. Lu <hongjiu.lu@intel.com>
+
+ Backport from mainline:
+ 2014-12-28 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gcc.target/i386/pr57003.c: Skip on x32.
+ * gcc.target/i386/pr60516.c: Likewise.
+
+2014-12-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ Backport from mainline:
+ 2014-12-26 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/64409
+ * gcc.target/i386/pr64409.c: New test.
+
+2014-12-23 Janus Weil <janus@gcc.gnu.org>
+
+ Backport from mainline
+ PR fortran/64244
+ * gfortran.dg/typebound_call_26.f90: New.
+
+2014-12-19 H.J. Lu <hongjiu.lu@intel.com>
+
+ Backported from mainline
+ 2014-12-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR rtl-optimization/64037
+ * g++.dg/pr64037.C: New test.
+
2014-12-19 Release Manager
* GCC 4.8.4 released.
@@ -272,7 +828,7 @@
Backported from mainline
2013-09-17 Cong Hou <congh@google.com>
- * gcc.dg/vect/vect-reduc-dot-s16c.c: Add a test case with dot product
+ * gcc.dg/vect/vect-reduc-dot-s16c.c: Add a test case with dot product
on two arrays with short and int types. This should not be recognized
as a dot product pattern.
Index: gcc/testsuite/g++.dg/debug/ra1.C
===================================================================
--- a/src/gcc/testsuite/g++.dg/debug/ra1.C (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/g++.dg/debug/ra1.C (.../branches/gcc-4_8-branch)
@@ -0,0 +1,77 @@
+/* { dg-options "-fcompare-debug" } */
+
+enum signop { SIGNED, UNSIGNED };
+enum tree_code { FOO, BAR };
+enum tree_code_class { tcc_type, tcc_other };
+extern enum tree_code_class tree_code_type[];
+
+struct tree_base {
+ enum tree_code code : 16;
+ unsigned unsigned_flag : 1;
+};
+
+struct tree_def {
+ tree_base base;
+ struct {
+ int precision;
+ } type_common;
+};
+
+typedef tree_def *tree;
+
+struct storage_ref
+{
+ storage_ref (const long *, unsigned int, unsigned int);
+
+ const long *val;
+ unsigned int len;
+ unsigned int precision;
+};
+
+inline storage_ref::storage_ref (const long *val_in,
+ unsigned int len_in,
+ unsigned int precision_in)
+ : val (val_in), len (len_in), precision (precision_in)
+{
+}
+
+struct hwi_with_prec
+{
+ long val;
+ unsigned int precision;
+ signop sgn;
+};
+
+inline storage_ref
+decompose (long *scratch, unsigned int precision,
+ const hwi_with_prec &x)
+{
+ scratch[0] = x.val;
+ if (x.sgn == SIGNED || x.val >= 0 || precision <= sizeof (long) * 8)
+ return storage_ref (scratch, 1, precision);
+ scratch[1] = 0;
+ return storage_ref (scratch, 2, precision);
+}
+
+extern void tree_class_check_failed (int) __attribute__ ((__noreturn__));
+
+inline tree
+tree_class_check (tree t, const enum tree_code_class cls, int x)
+{
+ if (tree_code_type[t->base.code] != cls)
+ tree_class_check_failed (x);
+ return t;
+}
+
+tree wide_int_to_tree (tree, const storage_ref &);
+
+tree
+build_int_cstu (tree type, unsigned long val)
+{
+ hwi_with_prec x;
+ x.val = val;
+ x.precision = tree_class_check (type, tcc_type, 1)->type_common.precision;
+ x.sgn = (signop) tree_class_check (type, tcc_type, 2)->base.unsigned_flag;
+ long scratch[2];
+ return wide_int_to_tree (type, decompose (scratch, x.precision, x));
+}
Index: gcc/testsuite/g++.dg/lookup/using55.C
===================================================================
--- a/src/gcc/testsuite/g++.dg/lookup/using55.C (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/g++.dg/lookup/using55.C (.../branches/gcc-4_8-branch)
@@ -0,0 +1,19 @@
+// PR c++/65721
+
+template<typename T>
+struct A {
+ typedef T D;
+};
+
+template<typename X>
+class B : public A<X> {
+ using typename B::D; // { dg-error "not a base" }
+public:
+ D echo(D x) { // { dg-error "D" }
+ return x;
+ }
+};
+
+int main() {
+ B<int> b;
+}
Index: gcc/testsuite/g++.dg/pr64037.C
===================================================================
--- a/src/gcc/testsuite/g++.dg/pr64037.C (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/g++.dg/pr64037.C (.../branches/gcc-4_8-branch)
@@ -0,0 +1,27 @@
+// { dg-do run { target i?86-*-* x86_64-*-* } }
+// { dg-options "-std=c++11 -Os" }
+
+enum class X : unsigned char {
+ V = 2,
+};
+
+static void
+__attribute__((noinline,noclone))
+foo(unsigned &out, unsigned a, X b)
+{
+ out = static_cast<unsigned>(b);
+}
+
+int main()
+{
+ unsigned deadbeef = 0xDEADBEEF;
+ asm volatile ("" : "+d" (deadbeef), "+c" (deadbeef));
+
+ unsigned out;
+ foo(out, 2, X::V);
+
+ if (out != 2)
+ __builtin_abort ();
+
+ return 0;
+}
Index: gcc/testsuite/g++.dg/pr65049.C
===================================================================
--- a/src/gcc/testsuite/g++.dg/pr65049.C (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/g++.dg/pr65049.C (.../branches/gcc-4_8-branch)
@@ -0,0 +1,19 @@
+// PR middle-end/65409
+// Reported by Ignacy Gawedzki <bugs@qult.net>
+
+struct Foo
+{
+ Foo() {}
+ int a;
+ int b;
+ char c;
+};
+
+Foo copy_foo(Foo);
+
+struct Bar : Foo
+{
+ Bar(Foo t) : Foo(copy_foo(t)) {}
+};
+
+Bar a = Foo();
Index: gcc/testsuite/g++.dg/lto/pr65193_0.C
===================================================================
--- a/src/gcc/testsuite/g++.dg/lto/pr65193_0.C (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/g++.dg/lto/pr65193_0.C (.../branches/gcc-4_8-branch)
@@ -0,0 +1,71 @@
+/* { dg-lto-do link } */
+/* { dg-require-effective-target fpic } */
+/* { dg-lto-options {{-fPIC -r -nostdlib -flto -O2 -g}} } */
+
+void frexp (int, int *);
+namespace std
+{
+ int ldexp (int, int);
+ struct A
+ {
+ };
+ template <class T> T get_min_shift_value ();
+ template <class> struct min_shift_initializer
+ {
+ struct B
+ {
+ B () { get_min_shift_value<long double> (); }
+ } static const b;
+ static void
+ m_fn1 ()
+ {
+ b;
+ }
+ };
+ template <class T>
+ const typename min_shift_initializer<T>::B min_shift_initializer<T>::b;
+ template <class T>
+ inline T
+ get_min_shift_value ()
+ {
+ using std::ldexp;
+ static T c = ldexp (0, 0);
+ min_shift_initializer<T>::m_fn1;
+ }
+ template <class T, class Policy>
+ void
+ float_next_imp (T p1, Policy p2)
+ {
+ using std::ldexp;
+ int d;
+ float_next (0, p2);
+ frexp (p1, &d);
+ }
+ template <class T, class Policy>
+ int
+ float_next (const T &p1, Policy &p2)
+ {
+ float_next_imp (p1, p2);
+ }
+ template <class T, class Policy> void float_prior_imp (T, Policy)
+ {
+ get_min_shift_value<T> ();
+ }
+ template <class T, class Policy> int float_prior (T, Policy)
+ {
+ float_prior_imp (static_cast<T> (0), 0);
+ }
+ template <class T, class U, class Policy>
+ void
+ nextafter (T p1, U p2, Policy p3)
+ {
+ p2 ? float_next (0, p3) : float_prior (p1, 0);
+ }
+ long double e;
+ int f;
+ void
+ nextafter ()
+ {
+ nextafter (e, f, A ());
+ }
+}
Index: gcc/testsuite/g++.dg/warn/Warray-bounds-6.C
===================================================================
--- a/src/gcc/testsuite/g++.dg/warn/Warray-bounds-6.C (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/g++.dg/warn/Warray-bounds-6.C (.../branches/gcc-4_8-branch)
@@ -0,0 +1,26 @@
+// { dg-do compile }
+// { dg-options "-O3 -Warray-bounds" }
+
+struct type {
+ bool a, b;
+ bool get_b() { return b; }
+};
+
+type stuff[9u];
+
+void bar();
+
+void foo()
+{
+ for(unsigned i = 0u; i < 9u; i++)
+ {
+ if(!stuff[i].a)
+ continue;
+
+ bar();
+
+ for(unsigned j = i + 1u; j < 9u; j++)
+ if(stuff[j].a && stuff[j].get_b()) // { dg-bogus "above array bounds" }
+ return;
+ }
+}
Index: gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice3.C
===================================================================
--- a/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice3.C (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice3.C (.../branches/gcc-4_8-branch)
@@ -3,7 +3,7 @@
class Klass
{
- unsigned int local;
+ unsigned int local; // { dg-message "" }
public:
bool dostuff();
};
@@ -11,7 +11,7 @@
bool Klass::dostuff()
{
auto f = []() -> bool {
- if (local & 1) { return true; } // { dg-error "not captured" }
+ if (local & 1) { return true; } // { dg-error "" }
return false;
};
}
Index: gcc/testsuite/g++.dg/cpp0x/lambda/lambda-decltype2.C
===================================================================
--- a/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-decltype2.C (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-decltype2.C (.../branches/gcc-4_8-branch)
@@ -0,0 +1,25 @@
+// PR c++/65727
+// { dg-do compile { target c++11 } }
+
+struct type_a { void(*cb)(); };
+
+struct type_b
+{
+ type_b(type_a p);
+ void dummy();
+};
+
+template<class T>
+constexpr T function_c(T**t) {return **t;}
+
+class type_d {
+ public:
+ static void dummy();
+};
+class type_e {
+ public:
+ static type_b b;
+ type_d *d[1];
+};
+
+type_b type_e::b = {{[](){decltype(function_c(type_e::d))::dummy();}}};
Index: gcc/testsuite/g++.dg/cpp0x/ref-qual16.C
===================================================================
--- a/src/gcc/testsuite/g++.dg/cpp0x/ref-qual16.C (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/g++.dg/cpp0x/ref-qual16.C (.../branches/gcc-4_8-branch)
@@ -0,0 +1,12 @@
+// PR c++/64297
+// { dg-do compile { target c++11 } }
+
+struct A {
+ typedef int X;
+ template <int> X m_fn1() const;
+};
+template <typename> struct is_function {};
+is_function<int() const &> i;
+struct D {
+ template <typename Y, typename = is_function<Y>> D(Y);
+} b(&A::m_fn1<0>);
Index: gcc/testsuite/g++.dg/template/offsetof3.C
===================================================================
--- a/src/gcc/testsuite/g++.dg/template/offsetof3.C (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/g++.dg/template/offsetof3.C (.../branches/gcc-4_8-branch)
@@ -0,0 +1,18 @@
+// PR c++/64487
+
+struct foo {
+ int member;
+};
+
+template < int N>
+struct bar {};
+
+template <int N>
+struct qux {
+ static bar<N+__builtin_offsetof(foo,member)> static_member;
+};
+
+template <int N>
+bar<N+__builtin_offsetof(foo,member)> qux<N>::static_member;
+
+int main() { }
Index: gcc/testsuite/g++.dg/template/non-dependent14.C
===================================================================
--- a/src/gcc/testsuite/g++.dg/template/non-dependent14.C (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/g++.dg/template/non-dependent14.C (.../branches/gcc-4_8-branch)
@@ -0,0 +1,7 @@
+// PR c++/64251
+
+class DictionaryValue {};
+template <typename T> void CreateValue(T) {
+ DictionaryValue(0);
+ CreateValue(0);
+}
Index: gcc/testsuite/c-c++-common/pr61553.c
===================================================================
--- a/src/gcc/testsuite/c-c++-common/pr61553.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/c-c++-common/pr61553.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,8 @@
+/* PR c/61553 */
+/* { dg-do compile } */
+
+void
+foo (char *s)
+{
+ __atomic_store (s, (void *) 0, __ATOMIC_SEQ_CST); /* { dg-error "size mismatch" } */
+}
Index: gcc/testsuite/c-c++-common/pr57653-2.c
===================================================================
--- a/src/gcc/testsuite/c-c++-common/pr57653-2.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/c-c++-common/pr57653-2.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,4 @@
+/* { dg-do preprocess } */
+/* { dg-options "-imacros ${srcdir}/c-c++-common/pr57653-2.h" } */
+
+/* Empty. */
Index: gcc/testsuite/c-c++-common/pr57653-2.h
===================================================================
--- a/src/gcc/testsuite/c-c++-common/pr57653-2.h (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/c-c++-common/pr57653-2.h (.../branches/gcc-4_8-branch)
@@ -0,0 +1 @@
+
Index: gcc/testsuite/c-c++-common/pr57653.c
===================================================================
--- a/src/gcc/testsuite/c-c++-common/pr57653.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/c-c++-common/pr57653.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,6 @@
+/* { dg-do compile } */
+/* { dg-options "-imacros ${srcdir}/c-c++-common/pr57653.h" } */
+
+__attribute__((used)) static const char s[] = F;
+
+/* { dg-final { scan-assembler-not "command-line" } } */
Index: gcc/testsuite/c-c++-common/pr57653.h
===================================================================
--- a/src/gcc/testsuite/c-c++-common/pr57653.h (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/testsuite/c-c++-common/pr57653.h (.../branches/gcc-4_8-branch)
@@ -0,0 +1 @@
+#define F __FILE__
Index: gcc/cp/typeck.c
===================================================================
--- a/src/gcc/cp/typeck.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/cp/typeck.c (.../branches/gcc-4_8-branch)
@@ -8639,6 +8639,12 @@
/* This should really have a different TYPE_MAIN_VARIANT, but that gets
complex. */
tree result = build_qualified_type (type, memfn_quals);
+ if (tree canon = TYPE_CANONICAL (result))
+ if (canon != result)
+ /* check_qualified_type doesn't check the ref-qualifier, so make sure
+ TYPE_CANONICAL is correct. */
+ TYPE_CANONICAL (result)
+ = build_ref_qualified_type (canon, type_memfn_rqual (result));
result = build_exception_variant (result, TYPE_RAISES_EXCEPTIONS (type));
return build_ref_qualified_type (result, rqual);
}
Index: gcc/cp/ChangeLog
===================================================================
--- a/src/gcc/cp/ChangeLog (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/cp/ChangeLog (.../branches/gcc-4_8-branch)
@@ -1,3 +1,26 @@
+2015-04-23 Marek Polacek <polacek@redhat.com>
+
+ PR c++/65727
+ * semantics.c (maybe_resolve_dummy): Handle null return.
+
+2015-04-23 Jason Merrill <jason@redhat.com>
+
+ PR c++/65721
+ * name-lookup.c (do_class_using_decl): Complain about specifying
+ the current class even if there are dependent bases.
+
+2015-01-13 Jason Merrill <jason@redhat.com>
+
+ PR c++/64487
+ * semantics.c (finish_offsetof): Handle templates here.
+ * parser.c (cp_parser_builtin_offsetof): Not here.
+
+ PR c++/64251
+ * decl2.c (mark_used): Don't mark if in_template_function.
+
+ PR c++/64297
+ * typeck.c (apply_memfn_quals): Correct wrong TYPE_CANONICAL.
+
2014-12-19 Release Manager
* GCC 4.8.4 released.
Index: gcc/cp/semantics.c
===================================================================
--- a/src/gcc/cp/semantics.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/cp/semantics.c (.../branches/gcc-4_8-branch)
@@ -3651,6 +3651,14 @@
tree
finish_offsetof (tree expr)
{
+ /* If we're processing a template, we can't finish the semantics yet.
+ Otherwise we can fold the entire expression now. */
+ if (processing_template_decl)
+ {
+ expr = build1 (OFFSETOF_EXPR, size_type_node, expr);
+ return expr;
+ }
+
if (TREE_CODE (expr) == PSEUDO_DTOR_EXPR)
{
error ("cannot apply %<offsetof%> to destructor %<~%T%>",
@@ -9625,8 +9633,9 @@
/* In a lambda, need to go through 'this' capture. */
tree lam = CLASSTYPE_LAMBDA_EXPR (current_class_type);
tree cap = lambda_expr_this_capture (lam);
- object = build_x_indirect_ref (EXPR_LOCATION (object), cap,
- RO_NULL, tf_warning_or_error);
+ if (cap && cap != error_mark_node)
+ object = build_x_indirect_ref (EXPR_LOCATION (object), cap,
+ RO_NULL, tf_warning_or_error);
}
return object;
Index: gcc/cp/decl2.c
===================================================================
--- a/src/gcc/cp/decl2.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/cp/decl2.c (.../branches/gcc-4_8-branch)
@@ -4606,7 +4606,7 @@
--function_depth;
}
- if (processing_template_decl)
+ if (processing_template_decl || in_template_function ())
return true;
/* Check this too in case we're within fold_non_dependent_expr. */
Index: gcc/cp/parser.c
===================================================================
--- a/src/gcc/cp/parser.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/cp/parser.c (.../branches/gcc-4_8-branch)
@@ -8024,12 +8024,7 @@
}
success:
- /* If we're processing a template, we can't finish the semantics yet.
- Otherwise we can fold the entire expression now. */
- if (processing_template_decl)
- expr = build1 (OFFSETOF_EXPR, size_type_node, expr);
- else
- expr = finish_offsetof (expr);
+ expr = finish_offsetof (expr);
failure:
parser->integral_constant_expression_p = save_ice_p;
Index: gcc/cp/name-lookup.c
===================================================================
--- a/src/gcc/cp/name-lookup.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/cp/name-lookup.c (.../branches/gcc-4_8-branch)
@@ -3288,7 +3288,7 @@
tf_warning_or_error);
if (b_kind < bk_proper_base)
{
- if (!bases_dependent_p)
+ if (!bases_dependent_p || b_kind == bk_same_type)
{
error_not_base_type (scope, current_class_type);
return NULL_TREE;
Index: gcc/web.c
===================================================================
--- a/src/gcc/web.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/web.c (.../branches/gcc-4_8-branch)
@@ -53,17 +53,17 @@
/* Find the root of unionfind tree (the representative of set). */
-struct web_entry *
-unionfind_root (struct web_entry *element)
+web_entry_base *
+web_entry_base::unionfind_root ()
{
- struct web_entry *element1 = element, *element2;
+ web_entry_base *element = this, *element1 = this, *element2;
- while (element->pred)
- element = element->pred;
- while (element1->pred)
+ while (element->pred ())
+ element = element->pred ();
+ while (element1->pred ())
{
- element2 = element1->pred;
- element1->pred = element;
+ element2 = element1->pred ();
+ element1->set_pred (element);
element1 = element2;
}
return element;
@@ -74,23 +74,32 @@
nothing is done. Otherwise, return false. */
bool
-unionfind_union (struct web_entry *first, struct web_entry *second)
+unionfind_union (web_entry_base *first, web_entry_base *second)
{
- first = unionfind_root (first);
- second = unionfind_root (second);
+ first = first->unionfind_root ();
+ second = second->unionfind_root ();
if (first == second)
return true;
- second->pred = first;
+ second->set_pred (first);
return false;
}
+class web_entry : public web_entry_base
+{
+ private:
+ rtx reg_pvt;
+
+ public:
+ rtx reg () { return reg_pvt; }
+ void set_reg (rtx r) { reg_pvt = r; }
+};
+
/* For INSN, union all defs and uses that are linked by match_dup.
FUN is the function that does the union. */
static void
-union_match_dups (rtx insn, struct web_entry *def_entry,
- struct web_entry *use_entry,
- bool (*fun) (struct web_entry *, struct web_entry *))
+union_match_dups (rtx insn, web_entry *def_entry, web_entry *use_entry,
+ bool (*fun) (web_entry_base *, web_entry_base *))
{
struct df_insn_info *insn_info = DF_INSN_INFO_GET (insn);
df_ref *use_link = DF_INSN_INFO_USES (insn_info);
@@ -157,9 +166,9 @@
the values 0 and 1 are reserved for use by entry_register. */
void
-union_defs (df_ref use, struct web_entry *def_entry,
- unsigned int *used, struct web_entry *use_entry,
- bool (*fun) (struct web_entry *, struct web_entry *))
+union_defs (df_ref use, web_entry *def_entry,
+ unsigned int *used, web_entry *use_entry,
+ bool (*fun) (web_entry_base *, web_entry_base *))
{
struct df_insn_info *insn_info = DF_REF_INSN_INFO (use);
struct df_link *link = DF_REF_CHAIN (use);
@@ -260,15 +269,15 @@
/* Find the corresponding register for the given entry. */
static rtx
-entry_register (struct web_entry *entry, df_ref ref, unsigned int *used)
+entry_register (web_entry *entry, df_ref ref, unsigned int *used)
{
- struct web_entry *root;
+ web_entry *root;
rtx reg, newreg;
/* Find the corresponding web and see if it has been visited. */
- root = unionfind_root (entry);
- if (root->reg)
- return root->reg;
+ root = (web_entry *)entry->unionfind_root ();
+ if (root->reg ())
+ return root->reg ();
/* We are seeing this web for the first time, do the assignment. */
reg = DF_REF_REAL_REG (ref);
@@ -292,7 +301,7 @@
REGNO (newreg));
}
- root->reg = newreg;
+ root->set_reg (newreg);
return newreg;
}
@@ -326,8 +335,8 @@
static unsigned int
web_main (void)
{
- struct web_entry *def_entry;
- struct web_entry *use_entry;
+ web_entry *def_entry;
+ web_entry *use_entry;
unsigned int max = max_reg_num ();
unsigned int *used;
basic_block bb;
@@ -364,9 +373,9 @@
}
/* Record the number of uses and defs at the beginning of the optimization. */
- def_entry = XCNEWVEC (struct web_entry, DF_DEFS_TABLE_SIZE());
+ def_entry = XCNEWVEC (web_entry, DF_DEFS_TABLE_SIZE());
used = XCNEWVEC (unsigned, max);
- use_entry = XCNEWVEC (struct web_entry, uses_num);
+ use_entry = XCNEWVEC (web_entry, uses_num);
/* Produce the web. */
FOR_ALL_BB (bb)
Index: gcc/tree-stdarg.c
===================================================================
--- a/src/gcc/tree-stdarg.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/tree-stdarg.c (.../branches/gcc-4_8-branch)
@@ -809,21 +809,22 @@
/* For va_list_simple_ptr, we have to check PHI nodes too. We treat
them as assignments for the purpose of escape analysis. This is
not needed for non-simple va_list because virtual phis don't perform
- any real data movement. */
- if (va_list_simple_ptr)
+ any real data movement. Also, check PHI nodes for taking address of
+ the va_list vars. */
+ tree lhs, rhs;
+ use_operand_p uop;
+ ssa_op_iter soi;
+
+ for (i = gsi_start_phis (bb); !gsi_end_p (i); gsi_next (&i))
{
- tree lhs, rhs;
- use_operand_p uop;
- ssa_op_iter soi;
+ gimple phi = gsi_stmt (i);
+ lhs = PHI_RESULT (phi);
- for (i = gsi_start_phis (bb); !gsi_end_p (i); gsi_next (&i))
+ if (virtual_operand_p (lhs))
+ continue;
+
+ if (va_list_simple_ptr)
{
- gimple phi = gsi_stmt (i);
- lhs = PHI_RESULT (phi);
-
- if (virtual_operand_p (lhs))
- continue;
-
FOR_EACH_PHI_ARG (uop, phi, soi, SSA_OP_USE)
{
rhs = USE_FROM_PTR (uop);
@@ -846,6 +847,22 @@
}
}
}
+
+ for (unsigned j = 0; !va_list_escapes
+ && j < gimple_phi_num_args (phi); ++j)
+ if ((!va_list_simple_ptr
+ || TREE_CODE (gimple_phi_arg_def (phi, j)) != SSA_NAME)
+ && walk_tree (gimple_phi_arg_def_ptr (phi, j),
+ find_va_list_reference, &wi, NULL))
+ {
+ if (dump_file && (dump_flags & TDF_DETAILS))
+ {
+ fputs ("va_list escapes in ", dump_file);
+ print_gimple_stmt (dump_file, phi, 0, dump_flags);
+ fputc ('\n', dump_file);
+ }
+ va_list_escapes = true;
+ }
}
for (i = gsi_start_bb (bb);
@@ -868,8 +885,8 @@
if (is_gimple_assign (stmt))
{
- tree lhs = gimple_assign_lhs (stmt);
- tree rhs = gimple_assign_rhs1 (stmt);
+ lhs = gimple_assign_lhs (stmt);
+ rhs = gimple_assign_rhs1 (stmt);
if (va_list_simple_ptr)
{
Index: gcc/lto-streamer-out.c
===================================================================
--- a/src/gcc/lto-streamer-out.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/lto-streamer-out.c (.../branches/gcc-4_8-branch)
@@ -129,6 +129,9 @@
else if (TREE_CODE (t) == VAR_DECL && decl_function_context (t)
&& !TREE_STATIC (t))
return false;
+ /* IMPORTED_DECL is put into BLOCK and thus it never can be shared. */
+ else if (TREE_CODE (t) == IMPORTED_DECL)
+ return false;
/* Variably modified types need to be streamed alongside function
bodies because they can refer to local entities. Together with
them we have to localize their members as well.
Index: gcc/jump.c
===================================================================
--- a/src/gcc/jump.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/jump.c (.../branches/gcc-4_8-branch)
@@ -133,7 +133,30 @@
if (BARRIER_P (prev))
delete_insn (insn);
else if (prev != PREV_INSN (insn))
- reorder_insns (insn, insn, prev);
+ {
+ basic_block bb = BLOCK_FOR_INSN (prev);
+ rtx end = PREV_INSN (insn);
+ reorder_insns_nobb (insn, insn, prev);
+ if (bb)
+ {
+ /* If the backend called in machine reorg compute_bb_for_insn
+ and didn't free_bb_for_insn again, preserve basic block
+ boundaries. Move the end of basic block to PREV since
+ it is followed by a barrier now, and clear BLOCK_FOR_INSN
+ on the following notes.
+ ??? Maybe the proper solution for the targets that have
+ cfg around after machine reorg is not to run cleanup_barriers
+ pass at all. */
+ BB_END (bb) = prev;
+ do
+ {
+ prev = NEXT_INSN (prev);
+ if (prev != insn && BLOCK_FOR_INSN (prev) == bb)
+ BLOCK_FOR_INSN (prev) = NULL;
+ }
+ while (prev != end);
+ }
+ }
}
}
return 0;
Index: gcc/dwarf2out.c
===================================================================
--- a/src/gcc/dwarf2out.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/dwarf2out.c (.../branches/gcc-4_8-branch)
@@ -18812,6 +18812,9 @@
case OPT__sysroot_:
case OPT_nostdinc:
case OPT_nostdinc__:
+ case OPT_fpreprocessed:
+ case OPT_fltrans_output_list_:
+ case OPT_fresolution_:
/* Ignore these. */
continue;
default:
@@ -23316,8 +23319,13 @@
gen_remaining_tmpl_value_param_die_attribute ();
/* Add the name for the main input file now. We delayed this from
- dwarf2out_init to avoid complications with PCH. */
- add_name_attribute (comp_unit_die (), remap_debug_filename (filename));
+ dwarf2out_init to avoid complications with PCH.
+ For LTO produced units use a fixed artificial name to avoid
+ leaking tempfile names into the dwarf. */
+ if (!in_lto_p)
+ add_name_attribute (comp_unit_die (), remap_debug_filename (filename));
+ else
+ add_name_attribute (comp_unit_die (), "<artificial>");
if (!IS_ABSOLUTE_PATH (filename) || targetm.force_at_comp_dir)
add_comp_dir_attribute (comp_unit_die ());
else if (get_AT (comp_unit_die (), DW_AT_comp_dir) == NULL)
Index: gcc/expr.c
===================================================================
--- a/src/gcc/expr.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/expr.c (.../branches/gcc-4_8-branch)
@@ -4708,8 +4708,6 @@
int unsignedp;
int volatilep = 0;
tree tem;
- bool misalignp;
- rtx mem = NULL_RTX;
push_temp_slots ();
tem = get_inner_reference (to, &bitsize, &bitpos, &offset, &mode1,
@@ -4728,41 +4726,8 @@
&& DECL_BIT_FIELD_TYPE (TREE_OPERAND (to, 1)))
get_bit_range (&bitregion_start, &bitregion_end, to, &bitpos, &offset);
- /* If we are going to use store_bit_field and extract_bit_field,
- make sure to_rtx will be safe for multiple use. */
- mode = TYPE_MODE (TREE_TYPE (tem));
- if (TREE_CODE (tem) == MEM_REF
- && mode != BLKmode
- && ((align = get_object_alignment (tem))
- < GET_MODE_ALIGNMENT (mode))
- && ((icode = optab_handler (movmisalign_optab, mode))
- != CODE_FOR_nothing))
- {
- struct expand_operand ops[2];
+ to_rtx = expand_expr (tem, NULL_RTX, VOIDmode, EXPAND_WRITE);
- misalignp = true;
- to_rtx = gen_reg_rtx (mode);
- mem = expand_expr (tem, NULL_RTX, VOIDmode, EXPAND_WRITE);
-
- /* If the misaligned store doesn't overwrite all bits, perform
- rmw cycle on MEM. */
- if (bitsize != GET_MODE_BITSIZE (mode))
- {
- create_input_operand (&ops[0], to_rtx, mode);
- create_fixed_operand (&ops[1], mem);
- /* The movmisalign<mode> pattern cannot fail, else the assignment
- would silently be omitted. */
- expand_insn (icode, 2, ops);
-
- mem = copy_rtx (mem);
- }
- }
- else
- {
- misalignp = false;
- to_rtx = expand_expr (tem, NULL_RTX, VOIDmode, EXPAND_WRITE);
- }
-
/* If the bitfield is volatile, we want to access it in the
field's mode, not the computed mode.
If a MEM has VOIDmode (external with incomplete type),
@@ -4900,17 +4865,6 @@
get_alias_set (to), nontemporal);
}
- if (misalignp)
- {
- struct expand_operand ops[2];
-
- create_fixed_operand (&ops[0], mem);
- create_input_operand (&ops[1], to_rtx, mode);
- /* The movmisalign<mode> pattern cannot fail, else the assignment
- would silently be omitted. */
- expand_insn (icode, 2, ops);
- }
-
if (result)
preserve_temp_slots (result);
pop_temp_slots ();
@@ -5262,7 +5216,7 @@
temp = expand_expr_real (exp, tmp_target, GET_MODE (target),
(call_param_p
? EXPAND_STACK_PARM : EXPAND_NORMAL),
- &alt_rtl);
+ &alt_rtl, false);
}
/* If TEMP is a VOIDmode constant and the mode of the type of EXP is not
@@ -6476,11 +6430,12 @@
&& mode != TYPE_MODE (TREE_TYPE (exp)))
temp = convert_modes (mode, TYPE_MODE (TREE_TYPE (exp)), temp, 1);
- /* If the modes of TEMP and TARGET are both BLKmode, both
- must be in memory and BITPOS must be aligned on a byte
- boundary. If so, we simply do a block copy. Likewise
- for a BLKmode-like TARGET. */
- if (GET_MODE (temp) == BLKmode
+ /* If TEMP is not a PARALLEL (see below) and its mode and that of TARGET
+ are both BLKmode, both must be in memory and BITPOS must be aligned
+ on a byte boundary. If so, we simply do a block copy. Likewise for
+ a BLKmode-like TARGET. */
+ if (GET_CODE (temp) != PARALLEL
+ && GET_MODE (temp) == BLKmode
&& (GET_MODE (target) == BLKmode
|| (MEM_P (target)
&& GET_MODE_CLASS (GET_MODE (target)) == MODE_INT
@@ -7881,11 +7836,21 @@
address, and ALT_RTL is non-NULL, then *ALT_RTL is set to the
DECL_RTL of the VAR_DECL. *ALT_RTL is also set if EXP is a
COMPOUND_EXPR whose second argument is such a VAR_DECL, and so on
- recursively. */
+ recursively.
+ If INNER_REFERENCE_P is true, we are expanding an inner reference.
+ In this case, we don't adjust a returned MEM rtx that wouldn't be
+ sufficiently aligned for its mode; instead, it's up to the caller
+ to deal with it afterwards. This is used to make sure that unaligned
+ base objects for which out-of-bounds accesses are supported, for
+ example record types with trailing arrays, aren't realigned behind
+ the back of the caller.
+ The normal operating mode is to pass FALSE for this parameter. */
+
rtx
expand_expr_real (tree exp, rtx target, enum machine_mode tmode,
- enum expand_modifier modifier, rtx *alt_rtl)
+ enum expand_modifier modifier, rtx *alt_rtl,
+ bool inner_reference_p)
{
rtx ret;
@@ -7897,7 +7862,8 @@
return ret ? ret : const0_rtx;
}
- ret = expand_expr_real_1 (exp, target, tmode, modifier, alt_rtl);
+ ret = expand_expr_real_1 (exp, target, tmode, modifier, alt_rtl,
+ inner_reference_p);
return ret;
}
@@ -9190,7 +9156,8 @@
rtx
expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
- enum expand_modifier modifier, rtx *alt_rtl)
+ enum expand_modifier modifier, rtx *alt_rtl,
+ bool inner_reference_p)
{
rtx op0, op1, temp, decl_rtl;
tree type;
@@ -9336,7 +9303,7 @@
set_curr_insn_location (gimple_location (g));
r = expand_expr_real (gimple_assign_rhs_to_tree (g), target,
- tmode, modifier, NULL);
+ tmode, modifier, NULL, inner_reference_p);
set_curr_insn_location (saved_loc);
if (REG_P (r) && !REG_EXPR (r))
set_reg_attrs_for_decl_rtl (SSA_NAME_VAR (exp), r);
@@ -9557,7 +9524,8 @@
case SAVE_EXPR:
{
tree val = treeop0;
- rtx ret = expand_expr_real_1 (val, target, tmode, modifier, alt_rtl);
+ rtx ret = expand_expr_real_1 (val, target, tmode, modifier, alt_rtl,
+ inner_reference_p);
if (!SAVE_EXPR_RESOLVED_P (exp))
{
@@ -9706,6 +9674,7 @@
MEM_VOLATILE_P (temp) = 1;
if (modifier != EXPAND_WRITE
&& modifier != EXPAND_MEMORY
+ && !inner_reference_p
&& mode != BLKmode
&& align < GET_MODE_ALIGNMENT (mode))
{
@@ -9940,18 +9909,19 @@
computation, since it will need a temporary and TARGET is known
to have to do. This occurs in unchecked conversion in Ada. */
orig_op0 = op0
- = expand_expr (tem,
- (TREE_CODE (TREE_TYPE (tem)) == UNION_TYPE
- && COMPLETE_TYPE_P (TREE_TYPE (tem))
- && (TREE_CODE (TYPE_SIZE (TREE_TYPE (tem)))
- != INTEGER_CST)
- && modifier != EXPAND_STACK_PARM
- ? target : NULL_RTX),
- VOIDmode,
- (modifier == EXPAND_INITIALIZER
- || modifier == EXPAND_CONST_ADDRESS
- || modifier == EXPAND_STACK_PARM)
- ? modifier : EXPAND_NORMAL);
+ = expand_expr_real (tem,
+ (TREE_CODE (TREE_TYPE (tem)) == UNION_TYPE
+ && COMPLETE_TYPE_P (TREE_TYPE (tem))
+ && (TREE_CODE (TYPE_SIZE (TREE_TYPE (tem)))
+ != INTEGER_CST)
+ && modifier != EXPAND_STACK_PARM
+ ? target : NULL_RTX),
+ VOIDmode,
+ (modifier == EXPAND_INITIALIZER
+ || modifier == EXPAND_CONST_ADDRESS
+ || modifier == EXPAND_STACK_PARM)
+ ? modifier : EXPAND_NORMAL,
+ NULL, true);
/* If the bitfield is volatile, we want to access it in the
@@ -10302,17 +10272,18 @@
{
/* See the normal_inner_ref case for the rationale. */
orig_op0
- = expand_expr (tem,
- (TREE_CODE (TREE_TYPE (tem)) == UNION_TYPE
- && (TREE_CODE (TYPE_SIZE (TREE_TYPE (tem)))
- != INTEGER_CST)
- && modifier != EXPAND_STACK_PARM
- ? target : NULL_RTX),
- VOIDmode,
- (modifier == EXPAND_INITIALIZER
- || modifier == EXPAND_CONST_ADDRESS
- || modifier == EXPAND_STACK_PARM)
- ? modifier : EXPAND_NORMAL);
+ = expand_expr_real (tem,
+ (TREE_CODE (TREE_TYPE (tem)) == UNION_TYPE
+ && (TREE_CODE (TYPE_SIZE (TREE_TYPE (tem)))
+ != INTEGER_CST)
+ && modifier != EXPAND_STACK_PARM
+ ? target : NULL_RTX),
+ VOIDmode,
+ (modifier == EXPAND_INITIALIZER
+ || modifier == EXPAND_CONST_ADDRESS
+ || modifier == EXPAND_STACK_PARM)
+ ? modifier : EXPAND_NORMAL,
+ NULL, true);
if (MEM_P (orig_op0))
{
@@ -10339,8 +10310,8 @@
}
if (!op0)
- op0 = expand_expr (treeop0,
- NULL_RTX, VOIDmode, modifier);
+ op0 = expand_expr_real (treeop0, NULL_RTX, VOIDmode, modifier,
+ NULL, inner_reference_p);
/* If the input and output modes are both the same, we are done. */
if (mode == GET_MODE (op0))
@@ -10407,50 +10378,53 @@
op0 = copy_rtx (op0);
set_mem_align (op0, MAX (MEM_ALIGN (op0), TYPE_ALIGN (type)));
}
- else if (mode != BLKmode
- && MEM_ALIGN (op0) < GET_MODE_ALIGNMENT (mode)
- /* If the target does have special handling for unaligned
- loads of mode then use them. */
- && ((icode = optab_handler (movmisalign_optab, mode))
- != CODE_FOR_nothing))
- {
- rtx reg, insn;
-
- op0 = adjust_address (op0, mode, 0);
- /* We've already validated the memory, and we're creating a
- new pseudo destination. The predicates really can't
- fail. */
- reg = gen_reg_rtx (mode);
-
- /* Nor can the insn generator. */
- insn = GEN_FCN (icode) (reg, op0);
- emit_insn (insn);
- return reg;
- }
- else if (STRICT_ALIGNMENT
+ else if (modifier != EXPAND_WRITE
+ && modifier != EXPAND_MEMORY
+ && !inner_reference_p
&& mode != BLKmode
&& MEM_ALIGN (op0) < GET_MODE_ALIGNMENT (mode))
{
- tree inner_type = TREE_TYPE (treeop0);
- HOST_WIDE_INT temp_size
- = MAX (int_size_in_bytes (inner_type),
- (HOST_WIDE_INT) GET_MODE_SIZE (mode));
- rtx new_rtx
- = assign_stack_temp_for_type (mode, temp_size, type);
- rtx new_with_op0_mode
- = adjust_address (new_rtx, GET_MODE (op0), 0);
+ /* If the target does have special handling for unaligned
+ loads of mode then use them. */
+ if ((icode = optab_handler (movmisalign_optab, mode))
+ != CODE_FOR_nothing)
+ {
+ rtx reg, insn;
- gcc_assert (!TREE_ADDRESSABLE (exp));
+ op0 = adjust_address (op0, mode, 0);
+ /* We've already validated the memory, and we're creating a
+ new pseudo destination. The predicates really can't
+ fail. */
+ reg = gen_reg_rtx (mode);
- if (GET_MODE (op0) == BLKmode)
- emit_block_move (new_with_op0_mode, op0,
- GEN_INT (GET_MODE_SIZE (mode)),
- (modifier == EXPAND_STACK_PARM
- ? BLOCK_OP_CALL_PARM : BLOCK_OP_NORMAL));
- else
- emit_move_insn (new_with_op0_mode, op0);
+ /* Nor can the insn generator. */
+ insn = GEN_FCN (icode) (reg, op0);
+ emit_insn (insn);
+ return reg;
+ }
+ else if (STRICT_ALIGNMENT)
+ {
+ tree inner_type = TREE_TYPE (treeop0);
+ HOST_WIDE_INT temp_size
+ = MAX (int_size_in_bytes (inner_type),
+ (HOST_WIDE_INT) GET_MODE_SIZE (mode));
+ rtx new_rtx
+ = assign_stack_temp_for_type (mode, temp_size, type);
+ rtx new_with_op0_mode
+ = adjust_address (new_rtx, GET_MODE (op0), 0);
- op0 = new_rtx;
+ gcc_assert (!TREE_ADDRESSABLE (exp));
+
+ if (GET_MODE (op0) == BLKmode)
+ emit_block_move (new_with_op0_mode, op0,
+ GEN_INT (GET_MODE_SIZE (mode)),
+ (modifier == EXPAND_STACK_PARM
+ ? BLOCK_OP_CALL_PARM : BLOCK_OP_NORMAL));
+ else
+ emit_move_insn (new_with_op0_mode, op0);
+
+ op0 = new_rtx;
+ }
}
op0 = adjust_address (op0, mode, 0);
@@ -10550,7 +10524,7 @@
/* WITH_SIZE_EXPR expands to its first argument. The caller should
have pulled out the size to use in whatever context it needed. */
return expand_expr_real (treeop0, original_target, tmode,
- modifier, alt_rtl);
+ modifier, alt_rtl, inner_reference_p);
default:
return expand_expr_real_2 (&ops, target, tmode, modifier);
Index: gcc/expr.h
===================================================================
--- a/src/gcc/expr.h (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/expr.h (.../branches/gcc-4_8-branch)
@@ -41,7 +41,8 @@
is a constant that is not a legitimate address.
EXPAND_WRITE means we are only going to write to the resulting rtx.
EXPAND_MEMORY means we are interested in a memory result, even if
- the memory is constant and we could have propagated a constant value. */
+ the memory is constant and we could have propagated a constant value,
+ or the memory is unaligned on a STRICT_ALIGNMENT target. */
enum expand_modifier {EXPAND_NORMAL = 0, EXPAND_STACK_PARM, EXPAND_SUM,
EXPAND_CONST_ADDRESS, EXPAND_INITIALIZER, EXPAND_WRITE,
EXPAND_MEMORY};
@@ -428,9 +429,9 @@
/* Work horses for expand_expr. */
extern rtx expand_expr_real (tree, rtx, enum machine_mode,
- enum expand_modifier, rtx *);
+ enum expand_modifier, rtx *, bool);
extern rtx expand_expr_real_1 (tree, rtx, enum machine_mode,
- enum expand_modifier, rtx *);
+ enum expand_modifier, rtx *, bool);
extern rtx expand_expr_real_2 (sepops, rtx, enum machine_mode,
enum expand_modifier);
@@ -441,13 +442,13 @@
expand_expr (tree exp, rtx target, enum machine_mode mode,
enum expand_modifier modifier)
{
- return expand_expr_real (exp, target, mode, modifier, NULL);
+ return expand_expr_real (exp, target, mode, modifier, NULL, false);
}
static inline rtx
expand_normal (tree exp)
{
- return expand_expr_real (exp, NULL_RTX, VOIDmode, EXPAND_NORMAL, NULL);
+ return expand_expr_real (exp, NULL_RTX, VOIDmode, EXPAND_NORMAL, NULL, false);
}
/* At the start of a function, record that we have no previously-pushed
Index: gcc/ada/ChangeLog
===================================================================
--- a/src/gcc/ada/ChangeLog (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/ada/ChangeLog (.../branches/gcc-4_8-branch)
@@ -1,3 +1,8 @@
+2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc-interface/utils2.c (gnat_invariant_expr): Return null if the type
+ of the expression ends up being composite.
+
2014-12-19 Release Manager
* GCC 4.8.4 released.
Index: gcc/ada/gcc-interface/utils2.c
===================================================================
--- a/src/gcc/ada/gcc-interface/utils2.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/ada/gcc-interface/utils2.c (.../branches/gcc-4_8-branch)
@@ -2740,6 +2740,12 @@
&& DECL_INITIAL (expr))
expr = remove_conversions (DECL_INITIAL (expr), false);
+ /* We are only interested in scalar types at the moment and, even if we may
+ have gone through padding types in the above loop, we must be back to a
+ scalar value at this point. */
+ if (AGGREGATE_TYPE_P (TREE_TYPE (expr)))
+ return NULL_TREE;
+
if (TREE_CONSTANT (expr))
return fold_convert (type, expr);
Index: gcc/dse.c
===================================================================
--- a/src/gcc/dse.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/dse.c (.../branches/gcc-4_8-branch)
@@ -1594,6 +1594,10 @@
= rtx_group_vec[group_id];
mem_addr = group->canon_base_addr;
}
+ /* get_addr can only handle VALUE but cannot handle expr like:
+ VALUE + OFFSET, so call get_addr to get original addr for
+ mem_addr before plus_constant. */
+ mem_addr = get_addr (mem_addr);
if (offset)
mem_addr = plus_constant (get_address_mode (mem), mem_addr, offset);
}
@@ -2211,6 +2215,10 @@
= rtx_group_vec[group_id];
mem_addr = group->canon_base_addr;
}
+ /* get_addr can only handle VALUE but cannot handle expr like:
+ VALUE + OFFSET, so call get_addr to get original addr for
+ mem_addr before plus_constant. */
+ mem_addr = get_addr (mem_addr);
if (offset)
mem_addr = plus_constant (get_address_mode (mem), mem_addr, offset);
}
Index: gcc/fortran/interface.c
===================================================================
--- a/src/gcc/fortran/interface.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/fortran/interface.c (.../branches/gcc-4_8-branch)
@@ -3557,6 +3557,8 @@
gfc_user_op *uop;
gfc_intrinsic_op i;
const char *gname;
+ gfc_typebound_proc* tbo;
+ gfc_expr* tb_base;
sym = NULL;
@@ -3573,8 +3575,50 @@
i = fold_unary_intrinsic (e->value.op.op);
+ /* See if we find a matching type-bound operator. */
if (i == INTRINSIC_USER)
+ tbo = matching_typebound_op (&tb_base, actual,
+ i, e->value.op.uop->name, &gname);
+ else
+ switch (i)
+ {
+#define CHECK_OS_COMPARISON(comp) \
+ case INTRINSIC_##comp: \
+ case INTRINSIC_##comp##_OS: \
+ tbo = matching_typebound_op (&tb_base, actual, \
+ INTRINSIC_##comp, NULL, &gname); \
+ if (!tbo) \
+ tbo = matching_typebound_op (&tb_base, actual, \
+ INTRINSIC_##comp##_OS, NULL, &gname); \
+ break;
+ CHECK_OS_COMPARISON(EQ)
+ CHECK_OS_COMPARISON(NE)
+ CHECK_OS_COMPARISON(GT)
+ CHECK_OS_COMPARISON(GE)
+ CHECK_OS_COMPARISON(LT)
+ CHECK_OS_COMPARISON(LE)
+#undef CHECK_OS_COMPARISON
+
+ default:
+ tbo = matching_typebound_op (&tb_base, actual, i, NULL, &gname);
+ break;
+ }
+
+ /* If there is a matching typebound-operator, replace the expression with
+ a call to it and succeed. */
+ if (tbo)
{
+ gcc_assert (tb_base);
+ build_compcall_for_operator (e, actual, tb_base, tbo, gname);
+
+ if (gfc_resolve_expr (e) == FAILURE)
+ return MATCH_ERROR;
+ else
+ return MATCH_YES;
+ }
+
+ if (i == INTRINSIC_USER)
+ {
for (ns = gfc_current_ns; ns; ns = ns->parent)
{
uop = gfc_find_uop (e->value.op.uop->name, ns);
@@ -3623,54 +3667,6 @@
if (sym == NULL)
{
- gfc_typebound_proc* tbo;
- gfc_expr* tb_base;
-
- /* See if we find a matching type-bound operator. */
- if (i == INTRINSIC_USER)
- tbo = matching_typebound_op (&tb_base, actual,
- i, e->value.op.uop->name, &gname);
- else
- switch (i)
- {
-#define CHECK_OS_COMPARISON(comp) \
- case INTRINSIC_##comp: \
- case INTRINSIC_##comp##_OS: \
- tbo = matching_typebound_op (&tb_base, actual, \
- INTRINSIC_##comp, NULL, &gname); \
- if (!tbo) \
- tbo = matching_typebound_op (&tb_base, actual, \
- INTRINSIC_##comp##_OS, NULL, &gname); \
- break;
- CHECK_OS_COMPARISON(EQ)
- CHECK_OS_COMPARISON(NE)
- CHECK_OS_COMPARISON(GT)
- CHECK_OS_COMPARISON(GE)
- CHECK_OS_COMPARISON(LT)
- CHECK_OS_COMPARISON(LE)
-#undef CHECK_OS_COMPARISON
-
- default:
- tbo = matching_typebound_op (&tb_base, actual, i, NULL, &gname);
- break;
- }
-
- /* If there is a matching typebound-operator, replace the expression with
- a call to it and succeed. */
- if (tbo)
- {
- gfc_try result;
-
- gcc_assert (tb_base);
- build_compcall_for_operator (e, actual, tb_base, tbo, gname);
-
- result = gfc_resolve_expr (e);
- if (result == FAILURE)
- return MATCH_ERROR;
-
- return MATCH_YES;
- }
-
/* Don't use gfc_free_actual_arglist(). */
free (actual->next);
free (actual);
Index: gcc/fortran/trans-expr.c
===================================================================
--- a/src/gcc/fortran/trans-expr.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/fortran/trans-expr.c (.../branches/gcc-4_8-branch)
@@ -1553,10 +1553,12 @@
c = ref->u.c.component;
- gcc_assert (c->backend_decl);
+ if (c->backend_decl == NULL_TREE
+ && ref->u.c.sym != NULL)
+ gfc_get_derived_type (ref->u.c.sym);
field = c->backend_decl;
- gcc_assert (TREE_CODE (field) == FIELD_DECL);
+ gcc_assert (field && TREE_CODE (field) == FIELD_DECL);
decl = se->expr;
/* Components can correspond to fields of different containing
@@ -6545,6 +6547,7 @@
else if (expr2->expr_type == EXPR_VARIABLE)
{
/* Assign directly to the LHS's descriptor. */
+ lse.descriptor_only = 0;
lse.direct_byref = 1;
gfc_conv_expr_descriptor (&lse, expr2);
strlen_rhs = lse.string_length;
@@ -6569,7 +6572,7 @@
/* Assign to a temporary descriptor and then copy that
temporary to the pointer. */
tmp = gfc_create_var (TREE_TYPE (desc), "ptrtemp");
-
+ lse.descriptor_only = 0;
lse.expr = tmp;
lse.direct_byref = 1;
gfc_conv_expr_descriptor (&lse, expr2);
Index: gcc/fortran/trans-array.c
===================================================================
--- a/src/gcc/fortran/trans-array.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/fortran/trans-array.c (.../branches/gcc-4_8-branch)
@@ -4299,11 +4299,20 @@
for (ss = rss; ss != gfc_ss_terminator; ss = ss->next)
{
- if (ss->info->type != GFC_SS_SECTION)
- continue;
ss_expr = ss->info->expr;
+ if (ss->info->type != GFC_SS_SECTION)
+ {
+ /* Check for cases like c(:)(1:2) = c(2)(2:3) */
+ if (!nDepend && dest_expr->rank > 0
+ && dest_expr->ts.type == BT_CHARACTER
+ && ss_expr->expr_type == EXPR_VARIABLE)
+
+ nDepend = gfc_check_dependency (dest_expr, ss_expr, false);
+ continue;
+ }
+
if (dest_expr->symtree->n.sym != ss_expr->symtree->n.sym)
{
if (gfc_could_be_alias (dest, ss)
Index: gcc/fortran/symbol.c
===================================================================
--- a/src/gcc/fortran/symbol.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/fortran/symbol.c (.../branches/gcc-4_8-branch)
@@ -2717,8 +2717,8 @@
/* Save symbol with the information necessary to back it out. */
-static void
-save_symbol_data (gfc_symbol *sym)
+void
+gfc_save_symbol_data (gfc_symbol *sym)
{
gfc_symbol *s;
unsigned i;
@@ -2813,7 +2813,7 @@
p->mark = 1;
/* Copy in case this symbol is changed. */
- save_symbol_data (p);
+ gfc_save_symbol_data (p);
}
*result = st;
@@ -2852,7 +2852,7 @@
if (st != NULL)
{
- save_symbol_data (st->n.sym);
+ gfc_save_symbol_data (st->n.sym);
*result = st;
return i;
}
Index: gcc/fortran/decl.c
===================================================================
--- a/src/gcc/fortran/decl.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/fortran/decl.c (.../branches/gcc-4_8-branch)
@@ -2852,6 +2852,7 @@
return MATCH_ERROR;
}
+ gfc_save_symbol_data (sym);
gfc_set_sym_referenced (sym);
if (!sym->attr.generic
&& gfc_add_generic (&sym->attr, sym->name, NULL) == FAILURE)
@@ -2876,6 +2877,8 @@
sym->generic = intr;
sym->attr.if_source = IFSRC_DECL;
}
+ else
+ gfc_save_symbol_data (dt_sym);
gfc_set_sym_referenced (dt_sym);
Index: gcc/fortran/gfortran.h
===================================================================
--- a/src/gcc/fortran/gfortran.h (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/fortran/gfortran.h (.../branches/gcc-4_8-branch)
@@ -2638,6 +2638,7 @@
gfc_try verify_com_block_vars_c_interop (gfc_common_head *);
void generate_isocbinding_symbol (const char *, iso_c_binding_symbol, const char *);
gfc_symbol *get_iso_c_sym (gfc_symbol *, char *, const char *, int);
+void gfc_save_symbol_data (gfc_symbol *);
int gfc_get_sym_tree (const char *, gfc_namespace *, gfc_symtree **, bool);
int gfc_get_ha_symbol (const char *, gfc_symbol **);
int gfc_get_ha_sym_tree (const char *, gfc_symtree **);
Index: gcc/fortran/ChangeLog
===================================================================
--- a/src/gcc/fortran/ChangeLog (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/fortran/ChangeLog (.../branches/gcc-4_8-branch)
@@ -1,3 +1,85 @@
+2015-04-14 Mikael Morin <mikael@gcc.gnu.org>
+
+ PR fortran/56674
+ PR fortran/58813
+ PR fortran/59016
+ PR fortran/59024
+ * symbol.c (save_symbol_data, gfc_save_symbol_data): Rename the
+ former to the latter and make it non-static. Update callers.
+ * gfortran.h (gfc_save_symbol_data): New prototype.
+ * decl.c (gfc_match_decl_type_spec): Call 'gfc_save_symbol_data'
+ before modifying symbols 'sym' and 'dt_sym'.
+
+2015-03-21 Mikael Morin <mikael@gcc.gnu.org>
+
+ Backport from trunk:
+ 2015-03-14 Mikael Morin <mikael@gcc.gnu.org>
+
+ PR fortran/61138
+ * trans-expr.c (gfc_trans_pointer_assignment): Clear DESCRIPTOR_ONLY
+ field before reusing LSE.
+
+2015-03-15 Paul Thomas <pault@gcc.gnu.org>
+
+ Backport from mainline
+ PR fortran/65024
+ * trans-expr.c (gfc_conv_component_ref): If the component
+ backend declaration is missing and the derived type symbol is
+ available in the reference, call gfc_build_derived_type.
+
+2015-03-12 Mikael Morin <mikael@gcc.gnu.org>
+
+ PR fortran/60898
+ * resolve.c (resolve_symbol): Check that the symbol found by
+ name lookup really is the current symbol being resolved.
+
+2015-02-13 Mikael Morin <mikael@gcc.gnu.org>
+
+ PR fortran/63744
+ * module.c (check_for_ambiguous): Change argument type
+ from gfc_symbol to gfc_symtree. Check local (symtree) name
+ instead of original (symbol) name.
+ (read_module): Update caller.
+
+2015-02-01 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2015-01-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR fortran/64528
+ * trans-decl.c (create_function_arglist): Don't set TREE_READONLY
+ on dummy args with VALUE attribute.
+
+2015-01-24 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/56867
+ * trans-array.c (gfc_conv_resolve_dependencies): Also check
+ dependencies when there may be substrings of character arrays.
+
+2015-01-24 Thomas Koenig <tkoenig@netcologne.de>
+
+ Backport from trunk
+ PR fortran/57023
+ * dependency.c (callback_dummy_intent_not_int): New function.
+ (dummy_intent_not_in): New function.
+ (gfc_full_array_ref_p): Use dummy_intent_not_in.
+
+2015-01-12 Janus Weil <janus@gcc.gnu.org>
+
+ Backport from mainline
+ PR fortran/63733
+ * interface.c (gfc_extend_expr): Look for type-bound operators before
+ non-typebound ones.
+
+2014-12-23 Janus Weil <janus@gcc.gnu.org>
+
+ Backport from mainline
+ PR fortran/64244
+ * resolve.c (resolve_typebound_call): New argument to pass out the
+ non-overridable attribute of the specific procedure.
+ (resolve_typebound_subroutine): Get overridable flag from
+ resolve_typebound_call.
+
2014-12-19 Release Manager
* GCC 4.8.4 released.
Index: gcc/fortran/module.c
===================================================================
--- a/src/gcc/fortran/module.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/fortran/module.c (.../branches/gcc-4_8-branch)
@@ -4401,19 +4401,21 @@
/* It is not quite enough to check for ambiguity in the symbols by
the loaded symbol and the new symbol not being identical. */
static bool
-check_for_ambiguous (gfc_symbol *st_sym, pointer_info *info)
+check_for_ambiguous (gfc_symtree *st, pointer_info *info)
{
gfc_symbol *rsym;
module_locus locus;
symbol_attribute attr;
+ gfc_symbol *st_sym;
- if (gfc_current_ns->proc_name && st_sym->name == gfc_current_ns->proc_name->name)
+ if (gfc_current_ns->proc_name && st->name == gfc_current_ns->proc_name->name)
{
gfc_error ("'%s' of module '%s', imported at %C, is also the name of the "
- "current program unit", st_sym->name, module_name);
+ "current program unit", st->name, module_name);
return true;
}
+ st_sym = st->n.sym;
rsym = info->u.rsym.sym;
if (st_sym == rsym)
return false;
@@ -4648,7 +4650,7 @@
if (st != NULL)
{
/* Check for ambiguous symbols. */
- if (check_for_ambiguous (st->n.sym, info))
+ if (check_for_ambiguous (st, info))
st->ambiguous = 1;
else
info->u.rsym.symtree = st;
Index: gcc/fortran/resolve.c
===================================================================
--- a/src/gcc/fortran/resolve.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/fortran/resolve.c (.../branches/gcc-4_8-branch)
@@ -6048,7 +6048,7 @@
/* Resolve a call to a type-bound subroutine. */
static gfc_try
-resolve_typebound_call (gfc_code* c, const char **name)
+resolve_typebound_call (gfc_code* c, const char **name, bool *overridable)
{
gfc_actual_arglist* newactual;
gfc_symtree* target;
@@ -6072,6 +6072,10 @@
if (resolve_typebound_generic_call (c->expr1, name) == FAILURE)
return FAILURE;
+ /* Pass along the NON_OVERRIDABLE attribute of the specific TBP. */
+ if (overridable)
+ *overridable = !c->expr1->value.compcall.tbp->non_overridable;
+
/* Transform into an ordinary EXEC_CALL for now. */
if (resolve_typebound_static (c->expr1, &target, &newactual) == FAILURE)
@@ -6324,7 +6328,7 @@
if (c->ts.u.derived == NULL)
c->ts.u.derived = gfc_find_derived_vtab (declared);
- if (resolve_typebound_call (code, &name) == FAILURE)
+ if (resolve_typebound_call (code, &name, NULL) == FAILURE)
return FAILURE;
/* Use the generic name if it is there. */
@@ -6356,7 +6360,7 @@
}
if (st == NULL)
- return resolve_typebound_call (code, NULL);
+ return resolve_typebound_call (code, NULL, NULL);
if (resolve_ref (code->expr1) == FAILURE)
return FAILURE;
@@ -6369,10 +6373,10 @@
|| (!class_ref && st->n.sym->ts.type != BT_CLASS))
{
gfc_free_ref_list (new_ref);
- return resolve_typebound_call (code, NULL);
+ return resolve_typebound_call (code, NULL, NULL);
}
- if (resolve_typebound_call (code, &name) == FAILURE)
+ if (resolve_typebound_call (code, &name, &overridable) == FAILURE)
{
gfc_free_ref_list (new_ref);
return FAILURE;
@@ -13280,10 +13284,13 @@
{
this_symtree = gfc_find_symtree (gfc_current_ns->sym_root,
sym->name);
- gfc_release_symbol (sym);
- symtree->n.sym->refs++;
- this_symtree->n.sym = symtree->n.sym;
- return;
+ if (this_symtree->n.sym == sym)
+ {
+ symtree->n.sym->refs++;
+ gfc_release_symbol (sym);
+ this_symtree->n.sym = symtree->n.sym;
+ return;
+ }
}
}
Index: gcc/fortran/trans-decl.c
===================================================================
--- a/src/gcc/fortran/trans-decl.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/fortran/trans-decl.c (.../branches/gcc-4_8-branch)
@@ -2186,8 +2186,9 @@
/* Fill in arg stuff. */
DECL_CONTEXT (parm) = fndecl;
DECL_ARG_TYPE (parm) = TREE_VALUE (typelist);
- /* All implementation args are read-only. */
- TREE_READONLY (parm) = 1;
+ /* All implementation args except for VALUE are read-only. */
+ if (!f->sym->attr.value)
+ TREE_READONLY (parm) = 1;
if (POINTER_TYPE_P (type)
&& (!f->sym->attr.proc_pointer
&& f->sym->attr.flavor != FL_PROCEDURE))
Index: gcc/fortran/dependency.c
===================================================================
--- a/src/gcc/fortran/dependency.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/fortran/dependency.c (.../branches/gcc-4_8-branch)
@@ -1604,11 +1604,40 @@
return GFC_DEP_EQUAL;
}
+/* Callback function for checking if an expression depends on a
+ dummy variable which is any other than INTENT(IN). */
+static int
+callback_dummy_intent_not_in (gfc_expr **ep,
+ int *walk_subtrees ATTRIBUTE_UNUSED,
+ void *data ATTRIBUTE_UNUSED)
+{
+ gfc_expr *e = *ep;
+
+ if (e->expr_type == EXPR_VARIABLE && e->symtree
+ && e->symtree->n.sym->attr.dummy)
+ return e->symtree->n.sym->attr.intent != INTENT_IN;
+ else
+ return 0;
+}
+
+/* Auxiliary function to check if subexpressions have dummy variables which
+ are not intent(in).
+*/
+
+static bool
+dummy_intent_not_in (gfc_expr **ep)
+{
+ return gfc_expr_walker (ep, callback_dummy_intent_not_in, NULL);
+}
+
/* Determine if an array ref, usually an array section specifies the
entire array. In addition, if the second, pointer argument is
provided, the function will return true if the reference is
- contiguous; eg. (:, 1) gives true but (1,:) gives false. */
+ contiguous; eg. (:, 1) gives true but (1,:) gives false.
+ If one of the bounds depends on a dummy variable which is
+ not INTENT(IN), also return false, because the user may
+ have changed the variable. */
bool
gfc_full_array_ref_p (gfc_ref *ref, bool *contiguous)
@@ -1672,7 +1701,8 @@
&& (!ref->u.ar.as
|| !ref->u.ar.as->lower[i]
|| gfc_dep_compare_expr (ref->u.ar.start[i],
- ref->u.ar.as->lower[i])))
+ ref->u.ar.as->lower[i])
+ || dummy_intent_not_in (&ref->u.ar.start[i])))
lbound_OK = false;
/* Check the upper bound. */
if (ref->u.ar.end[i]
@@ -1679,7 +1709,8 @@
&& (!ref->u.ar.as
|| !ref->u.ar.as->upper[i]
|| gfc_dep_compare_expr (ref->u.ar.end[i],
- ref->u.ar.as->upper[i])))
+ ref->u.ar.as->upper[i])
+ || dummy_intent_not_in (&ref->u.ar.end[i])))
ubound_OK = false;
/* Check the stride. */
if (ref->u.ar.stride[i]
Index: gcc/df.h
===================================================================
--- a/src/gcc/df.h (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/df.h (.../branches/gcc-4_8-branch)
@@ -1132,20 +1132,22 @@
/* web */
-/* This entry is allocated for each reference in the insn stream. */
-struct web_entry
+class web_entry_base
{
- /* Pointer to the parent in the union/find tree. */
- struct web_entry *pred;
- /* Newly assigned register to the entry. Set only for roots. */
- rtx reg;
- void* extra_info;
+ private:
+ /* Reference to the parent in the union/find tree. */
+ web_entry_base *pred_pvt;
+
+ public:
+ /* Accessors. */
+ web_entry_base *pred () { return pred_pvt; }
+ void set_pred (web_entry_base *p) { pred_pvt = p; }
+
+ /* Find representative in union-find tree. */
+ web_entry_base *unionfind_root ();
+
+ /* Union with another set, returning TRUE if they are already unioned. */
+ friend bool unionfind_union (web_entry_base *first, web_entry_base *second);
};
-extern struct web_entry *unionfind_root (struct web_entry *);
-extern bool unionfind_union (struct web_entry *, struct web_entry *);
-extern void union_defs (df_ref, struct web_entry *,
- unsigned int *used, struct web_entry *,
- bool (*fun) (struct web_entry *, struct web_entry *));
-
#endif /* GCC_DF_H */
Index: gcc/alias.c
===================================================================
--- a/src/gcc/alias.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/alias.c (.../branches/gcc-4_8-branch)
@@ -148,7 +148,7 @@
static int rtx_equal_for_memref_p (const_rtx, const_rtx);
static int memrefs_conflict_p (int, rtx, int, rtx, HOST_WIDE_INT);
static void record_set (rtx, const_rtx, void *);
-static int base_alias_check (rtx, rtx, enum machine_mode,
+static int base_alias_check (rtx, rtx, rtx, rtx, enum machine_mode,
enum machine_mode);
static rtx find_base_value (rtx);
static int mems_in_disjoint_alias_sets_p (const_rtx, const_rtx);
@@ -380,17 +380,9 @@
static inline int
mems_in_disjoint_alias_sets_p (const_rtx mem1, const_rtx mem2)
{
-/* Perform a basic sanity check. Namely, that there are no alias sets
- if we're not using strict aliasing. This helps to catch bugs
- whereby someone uses PUT_CODE, but doesn't clear MEM_ALIAS_SET, or
- where a MEM is allocated in some way other than by the use of
- gen_rtx_MEM, and the MEM_ALIAS_SET is not cleared. If we begin to
- use alias sets to indicate that spilled registers cannot alias each
- other, we might need to remove this check. */
- gcc_assert (flag_strict_aliasing
- || (!MEM_ALIAS_SET (mem1) && !MEM_ALIAS_SET (mem2)));
-
- return ! alias_sets_conflict_p (MEM_ALIAS_SET (mem1), MEM_ALIAS_SET (mem2));
+ return (flag_strict_aliasing
+ && ! alias_sets_conflict_p (MEM_ALIAS_SET (mem1),
+ MEM_ALIAS_SET (mem2)));
}
/* Insert the NODE into the splay tree given by DATA. Used by
@@ -1674,34 +1666,30 @@
if (tmp1 == pic_offset_table_rtx && CONSTANT_P (tmp2))
return find_base_term (tmp2);
- /* If either operand is known to be a pointer, then use it
+ /* If either operand is known to be a pointer, then prefer it
to determine the base term. */
if (REG_P (tmp1) && REG_POINTER (tmp1))
+ ;
+ else if (REG_P (tmp2) && REG_POINTER (tmp2))
{
- rtx base = find_base_term (tmp1);
- if (base)
- return base;
+ rtx tem = tmp1;
+ tmp1 = tmp2;
+ tmp2 = tem;
}
- if (REG_P (tmp2) && REG_POINTER (tmp2))
- {
- rtx base = find_base_term (tmp2);
- if (base)
- return base;
- }
-
- /* Neither operand was known to be a pointer. Go ahead and find the
- base term for both operands. */
- tmp1 = find_base_term (tmp1);
- tmp2 = find_base_term (tmp2);
-
- /* If either base term is named object or a special address
+ /* Go ahead and find the base term for both operands. If either base
+ term is from a pointer or is a named object or a special address
(like an argument or stack reference), then use it for the
base term. */
- if (tmp1 != 0 && known_base_value_p (tmp1))
+ tmp1 = find_base_term (tmp1);
+ if (tmp1 != NULL_RTX
+ && ((REG_P (tmp1) && REG_POINTER (tmp1))
+ || known_base_value_p (tmp1)))
return tmp1;
-
- if (tmp2 != 0 && known_base_value_p (tmp2))
+ tmp2 = find_base_term (tmp2);
+ if (tmp2 != NULL_RTX
+ && ((REG_P (tmp2) && REG_POINTER (tmp2))
+ || known_base_value_p (tmp2)))
return tmp2;
/* We could not determine which of the two operands was the
@@ -1738,12 +1726,9 @@
objects, 1 if they might be pointers to the same object. */
static int
-base_alias_check (rtx x, rtx y, enum machine_mode x_mode,
- enum machine_mode y_mode)
+base_alias_check (rtx x, rtx x_base, rtx y, rtx y_base,
+ enum machine_mode x_mode, enum machine_mode y_mode)
{
- rtx x_base = find_base_term (x);
- rtx y_base = find_base_term (y);
-
/* If the address itself has no known base see if a known equivalent
value has one. If either address still has no known base, nothing
is known about aliasing. */
@@ -2453,6 +2438,7 @@
true_dependence_1 (const_rtx mem, enum machine_mode mem_mode, rtx mem_addr,
const_rtx x, rtx x_addr, bool mem_canonicalized)
{
+ rtx true_mem_addr;
rtx base;
int ret;
@@ -2472,10 +2458,26 @@
|| MEM_ALIAS_SET (mem) == ALIAS_SET_MEMORY_BARRIER)
return 1;
+ if (! x_addr)
+ x_addr = XEXP (x, 0);
+ x_addr = get_addr (x_addr);
+
+ if (! mem_addr)
+ {
+ mem_addr = XEXP (mem, 0);
+ if (mem_mode == VOIDmode)
+ mem_mode = GET_MODE (mem);
+ }
+ true_mem_addr = get_addr (mem_addr);
+
/* Read-only memory is by definition never modified, and therefore can't
- conflict with anything. We don't expect to find read-only set on MEM,
- but stupid user tricks can produce them, so don't die. */
- if (MEM_READONLY_P (x))
+ conflict with anything. However, don't assume anything when AND
+ addresses are involved and leave to the code below to determine
+ dependence. We don't expect to find read-only set on MEM, but
+ stupid user tricks can produce them, so don't die. */
+ if (MEM_READONLY_P (x)
+ && GET_CODE (x_addr) != AND
+ && GET_CODE (true_mem_addr) != AND)
return 0;
/* If we have MEMs referring to different address spaces (which can
@@ -2484,29 +2486,6 @@
if (MEM_ADDR_SPACE (mem) != MEM_ADDR_SPACE (x))
return 1;
- if (! mem_addr)
- {
- mem_addr = XEXP (mem, 0);
- if (mem_mode == VOIDmode)
- mem_mode = GET_MODE (mem);
- }
-
- if (! x_addr)
- {
- x_addr = XEXP (x, 0);
- if (!((GET_CODE (x_addr) == VALUE
- && GET_CODE (mem_addr) != VALUE
- && reg_mentioned_p (x_addr, mem_addr))
- || (GET_CODE (x_addr) != VALUE
- && GET_CODE (mem_addr) == VALUE
- && reg_mentioned_p (mem_addr, x_addr))))
- {
- x_addr = get_addr (x_addr);
- if (! mem_canonicalized)
- mem_addr = get_addr (mem_addr);
- }
- }
-
base = find_base_term (x_addr);
if (base && (GET_CODE (base) == LABEL_REF
|| (GET_CODE (base) == SYMBOL_REF
@@ -2513,12 +2492,14 @@
&& CONSTANT_POOL_ADDRESS_P (base))))
return 0;
- if (! base_alias_check (x_addr, mem_addr, GET_MODE (x), mem_mode))
+ rtx mem_base = find_base_term (true_mem_addr);
+ if (! base_alias_check (x_addr, base, true_mem_addr, mem_base,
+ GET_MODE (x), mem_mode))
return 0;
x_addr = canon_rtx (x_addr);
if (!mem_canonicalized)
- mem_addr = canon_rtx (mem_addr);
+ mem_addr = canon_rtx (true_mem_addr);
if ((ret = memrefs_conflict_p (GET_MODE_SIZE (mem_mode), mem_addr,
SIZE_FOR_MODE (x), x_addr, 0)) != -1)
@@ -2571,6 +2552,7 @@
bool mem_canonicalized, bool x_canonicalized, bool writep)
{
rtx mem_addr;
+ rtx true_mem_addr, true_x_addr;
rtx base;
int ret;
@@ -2591,8 +2573,20 @@
|| MEM_ALIAS_SET (mem) == ALIAS_SET_MEMORY_BARRIER)
return 1;
- /* A read from read-only memory can't conflict with read-write memory. */
- if (!writep && MEM_READONLY_P (mem))
+ if (!x_addr)
+ x_addr = XEXP (x, 0);
+ true_x_addr = get_addr (x_addr);
+
+ mem_addr = XEXP (mem, 0);
+ true_mem_addr = get_addr (mem_addr);
+
+ /* A read from read-only memory can't conflict with read-write memory.
+ Don't assume anything when AND addresses are involved and leave to
+ the code below to determine dependence. */
+ if (!writep
+ && MEM_READONLY_P (mem)
+ && GET_CODE (true_x_addr) != AND
+ && GET_CODE (true_mem_addr) != AND)
return 0;
/* If we have MEMs referring to different address spaces (which can
@@ -2601,43 +2595,26 @@
if (MEM_ADDR_SPACE (mem) != MEM_ADDR_SPACE (x))
return 1;
- mem_addr = XEXP (mem, 0);
- if (!x_addr)
- {
- x_addr = XEXP (x, 0);
- if (!((GET_CODE (x_addr) == VALUE
- && GET_CODE (mem_addr) != VALUE
- && reg_mentioned_p (x_addr, mem_addr))
- || (GET_CODE (x_addr) != VALUE
- && GET_CODE (mem_addr) == VALUE
- && reg_mentioned_p (mem_addr, x_addr))))
- {
- x_addr = get_addr (x_addr);
- if (!mem_canonicalized)
- mem_addr = get_addr (mem_addr);
- }
- }
+ base = find_base_term (true_mem_addr);
+ if (! writep
+ && base
+ && (GET_CODE (base) == LABEL_REF
+ || (GET_CODE (base) == SYMBOL_REF
+ && CONSTANT_POOL_ADDRESS_P (base))))
+ return 0;
- if (! writep)
- {
- base = find_base_term (mem_addr);
- if (base && (GET_CODE (base) == LABEL_REF
- || (GET_CODE (base) == SYMBOL_REF
- && CONSTANT_POOL_ADDRESS_P (base))))
- return 0;
- }
-
- if (! base_alias_check (x_addr, mem_addr, GET_MODE (x),
- GET_MODE (mem)))
+ rtx x_base = find_base_term (true_x_addr);
+ if (! base_alias_check (true_x_addr, x_base, true_mem_addr, base,
+ GET_MODE (x), GET_MODE (mem)))
return 0;
if (!x_canonicalized)
{
- x_addr = canon_rtx (x_addr);
+ x_addr = canon_rtx (true_x_addr);
x_mode = GET_MODE (x);
}
if (!mem_canonicalized)
- mem_addr = canon_rtx (mem_addr);
+ mem_addr = canon_rtx (true_mem_addr);
if ((ret = memrefs_conflict_p (SIZE_FOR_MODE (mem), mem_addr,
GET_MODE_SIZE (x_mode), x_addr, 0)) != -1)
@@ -2705,10 +2682,20 @@
|| MEM_ALIAS_SET (mem) == ALIAS_SET_MEMORY_BARRIER)
return 1;
+ x_addr = XEXP (x, 0);
+ x_addr = get_addr (x_addr);
+
+ mem_addr = XEXP (mem, 0);
+ mem_addr = get_addr (mem_addr);
+
/* Read-only memory is by definition never modified, and therefore can't
- conflict with anything. We don't expect to find read-only set on MEM,
- but stupid user tricks can produce them, so don't die. */
- if (MEM_READONLY_P (x))
+ conflict with anything. However, don't assume anything when AND
+ addresses are involved and leave to the code below to determine
+ dependence. We don't expect to find read-only set on MEM, but
+ stupid user tricks can produce them, so don't die. */
+ if (MEM_READONLY_P (x)
+ && GET_CODE (x_addr) != AND
+ && GET_CODE (mem_addr) != AND)
return 0;
/* If we have MEMs referring to different address spaces (which can
@@ -2717,25 +2704,12 @@
if (MEM_ADDR_SPACE (mem) != MEM_ADDR_SPACE (x))
return 1;
- x_addr = XEXP (x, 0);
- mem_addr = XEXP (mem, 0);
- if (!((GET_CODE (x_addr) == VALUE
- && GET_CODE (mem_addr) != VALUE
- && reg_mentioned_p (x_addr, mem_addr))
- || (GET_CODE (x_addr) != VALUE
- && GET_CODE (mem_addr) == VALUE
- && reg_mentioned_p (mem_addr, x_addr))))
- {
- x_addr = get_addr (x_addr);
- mem_addr = get_addr (mem_addr);
- }
-
- if (! base_alias_check (x_addr, mem_addr, GET_MODE (x), GET_MODE (mem_addr)))
+ rtx x_base = find_base_term (x_addr);
+ rtx mem_base = find_base_term (mem_addr);
+ if (! base_alias_check (x_addr, x_base, mem_addr, mem_base,
+ GET_MODE (x), GET_MODE (mem_addr)))
return 0;
- x_addr = canon_rtx (x_addr);
- mem_addr = canon_rtx (mem_addr);
-
if (nonoverlapping_memrefs_p (mem, x, true))
return 0;
Index: gcc/tree-vect-loop.c
===================================================================
--- a/src/gcc/tree-vect-loop.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/tree-vect-loop.c (.../branches/gcc-4_8-branch)
@@ -4362,7 +4362,10 @@
&& !STMT_VINFO_LIVE_P (exit_phi_vinfo))
|| double_reduc);
- STMT_VINFO_VEC_STMT (exit_phi_vinfo) = epilog_stmt;
+ if (double_reduc)
+ STMT_VINFO_VEC_STMT (exit_phi_vinfo) = inner_phi;
+ else
+ STMT_VINFO_VEC_STMT (exit_phi_vinfo) = epilog_stmt;
if (!double_reduc
|| STMT_VINFO_DEF_TYPE (exit_phi_vinfo)
!= vect_double_reduction_def)
Index: gcc/cfgexpand.c
===================================================================
--- a/src/gcc/cfgexpand.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/cfgexpand.c (.../branches/gcc-4_8-branch)
@@ -2111,7 +2111,7 @@
if (lhs)
expand_assignment (lhs, exp, false);
else
- expand_expr_real_1 (exp, const0_rtx, VOIDmode, EXPAND_NORMAL, NULL);
+ expand_expr (exp, const0_rtx, VOIDmode, EXPAND_NORMAL);
mark_transaction_restart_calls (stmt);
}
Index: gcc/tree-predcom.c
===================================================================
--- a/src/gcc/tree-predcom.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/tree-predcom.c (.../branches/gcc-4_8-branch)
@@ -1666,9 +1666,8 @@
if (chain->combined)
{
/* For combined chains, just remove the statements that are used to
- compute the values of the expression (except for the root one). */
- for (i = 1; chain->refs.iterate (i, &a); i++)
- remove_stmt (a->stmt);
+ compute the values of the expression (except for the root one).
+ We delay this until after all chains are processed. */
}
else
{
@@ -1697,9 +1696,21 @@
FOR_EACH_VEC_ELT (chains, i, chain)
{
- if (chain->type == CT_INVARIANT || chain->combined)
+ if (chain->type == CT_INVARIANT)
continue;
+ if (chain->combined)
+ {
+ /* For combined chains, we can't handle unrolling if we replace
+ looparound PHIs. */
+ dref a;
+ unsigned j;
+ for (j = 1; chain->refs.iterate (j, &a); j++)
+ if (gimple_code (a->stmt) == GIMPLE_PHI)
+ return 1;
+ continue;
+ }
+
/* The best unroll factor for this chain is equal to the number of
temporary variables that we create for it. */
af = chain->length;
@@ -1732,6 +1743,21 @@
execute_pred_commoning_chain (loop, chain, tmp_vars);
}
+ FOR_EACH_VEC_ELT (chains, i, chain)
+ {
+ if (chain->type == CT_INVARIANT)
+ ;
+ else if (chain->combined)
+ {
+ /* For combined chains, just remove the statements that are used to
+ compute the values of the expression (except for the root one). */
+ dref a;
+ unsigned j;
+ for (j = 1; chain->refs.iterate (j, &a); j++)
+ remove_stmt (a->stmt);
+ }
+ }
+
update_ssa (TODO_update_ssa_only_virtuals);
}
Index: gcc/varasm.c
===================================================================
--- a/src/gcc/varasm.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/varasm.c (.../branches/gcc-4_8-branch)
@@ -91,11 +91,6 @@
bool first_function_block_is_cold;
-/* We give all constants their own alias set. Perhaps redundant with
- MEM_READONLY_P, but pre-dates it. */
-
-static alias_set_type const_alias_set;
-
/* Whether we saw any functions with no_split_stack. */
static bool saw_no_split_stack;
@@ -3139,7 +3134,6 @@
rtl = gen_const_mem (TYPE_MODE (TREE_TYPE (exp)), symbol);
set_mem_attributes (rtl, exp, 1);
set_mem_alias_set (rtl, 0);
- set_mem_alias_set (rtl, const_alias_set);
/* We cannot share RTX'es in pool entries.
Mark this piece of RTL as required for unsharing. */
@@ -5865,7 +5859,6 @@
const_desc_htab = htab_create_ggc (1009, const_desc_hash,
const_desc_eq, NULL);
- const_alias_set = new_alias_set ();
shared_constant_pool = create_constant_pool ();
#ifdef TEXT_SECTION_ASM_OP
@@ -6858,7 +6851,13 @@
fputs (ASM_APP_OFF, asm_out_file);
if (targetm.asm_file_start_file_directive)
- output_file_directive (asm_out_file, main_input_filename);
+ {
+ /* LTO produced units have no meaningful main_input_filename. */
+ if (in_lto_p)
+ output_file_directive (asm_out_file, "<artificial>");
+ else
+ output_file_directive (asm_out_file, main_input_filename);
+ }
}
/* This is a generic routine suitable for use as TARGET_ASM_FILE_END
Index: gcc/ira.c
===================================================================
--- a/src/gcc/ira.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/ira.c (.../branches/gcc-4_8-branch)
@@ -2944,11 +2944,8 @@
prevent access beyond allocated memory for paradoxical memory subreg. */
FOR_EACH_BB (bb)
FOR_BB_INSNS (bb, insn)
- {
- if (! INSN_P (insn))
- continue;
- for_each_rtx (&insn, set_paradoxical_subreg, (void *)pdx_subregs);
- }
+ if (NONDEBUG_INSN_P (insn))
+ for_each_rtx (&insn, set_paradoxical_subreg, (void *) pdx_subregs);
/* Scan the insns and find which registers have equivalences. Do this
in a separate scan of the insns because (due to -fcse-follow-jumps)
Index: gcc/combine.c
===================================================================
--- a/src/gcc/combine.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/combine.c (.../branches/gcc-4_8-branch)
@@ -1527,8 +1527,8 @@
uns3 = TYPE_UNSIGNED (DECL_ARG_TYPE (arg));
/* The mode and signedness of the argument as it is actually passed,
- after any TARGET_PROMOTE_FUNCTION_ARGS-driven ABI promotions. */
- mode3 = promote_function_mode (DECL_ARG_TYPE (arg), mode2, &uns3,
+ see assign_parm_setup_reg in function.c. */
+ mode3 = promote_function_mode (TREE_TYPE (arg), mode1, &uns3,
TREE_TYPE (cfun->decl), 0);
/* The mode of the register in which the argument is being passed. */
Index: gcc/config.gcc
===================================================================
--- a/src/gcc/config.gcc (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/config.gcc (.../branches/gcc-4_8-branch)
@@ -2078,27 +2078,31 @@
powerpc*-*-linux*)
tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h"
extra_options="${extra_options} rs6000/sysv4.opt"
- tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
+ tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-ppccomm"
case ${target} in
powerpc*le-*-*)
tm_file="${tm_file} rs6000/sysv4le.h" ;;
esac
- maybe_biarch=yes
+ case ${target}:${with_cpu} in
+ powerpc64*: | powerpc64*:native) cpu_is_64bit=yes ;;
+ esac
+ maybe_biarch=${cpu_is_64bit}
+ case ${enable_targets} in
+ *powerpc64*) maybe_biarch=yes ;;
+ esac
case ${target} in
powerpc64*-*-linux*spe* | powerpc64*-*-linux*paired*)
- echo "*** Configuration ${target} not supported" 1>&2
+ echo "*** Configuration ${target} not supported" 1>&2
exit 1
;;
powerpc*-*-linux*spe* | powerpc*-*-linux*paired*)
maybe_biarch=
;;
- powerpc64*-*-linux*)
- test x$with_cpu != x || cpu_is_64bit=yes
- maybe_biarch=always
- ;;
esac
- case ${maybe_biarch}:${enable_targets}:${cpu_is_64bit} in
- always:* | yes:*powerpc64* | yes:all:* | yes:*:yes)
+ case ${target}:${enable_targets}:${maybe_biarch} in
+ powerpc64-* | powerpc-*:*:yes | *:*powerpc64-*:yes | *:all:yes \
+ | powerpc64le*:*powerpcle* | powerpc64le*:*powerpc-* \
+ | powerpcle-*:*powerpc64le*:yes)
if test x$cpu_is_64bit = xyes; then
tm_file="${tm_file} rs6000/default64.h"
fi
@@ -2119,9 +2123,14 @@
esac
extra_options="${extra_options} rs6000/linux64.opt"
;;
+ powerpc64*)
+ tm_file="${tm_file} rs6000/default64.h rs6000/linux64.h glibc-stdint.h"
+ extra_options="${extra_options} rs6000/linux64.opt"
+ tmake_file="${tmake_file} rs6000/t-linux"
+ ;;
*)
tm_file="${tm_file} rs6000/linux.h glibc-stdint.h"
- tmake_file="$tmake_file rs6000/t-linux"
+ tmake_file="${tmake_file} rs6000/t-ppcos rs6000/t-linux"
;;
esac
case ${target} in
Index: gcc/config/alpha/alpha.md
===================================================================
--- a/src/gcc/config/alpha/alpha.md (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/config/alpha/alpha.md (.../branches/gcc-4_8-branch)
@@ -4496,8 +4496,8 @@
(define_insn_and_split "reload_out<mode>_aligned"
[(set (match_operand:I12MODE 0 "memory_operand" "=m")
(match_operand:I12MODE 1 "register_operand" "r"))
- (clobber (match_operand:SI 2 "register_operand" "=r"))
- (clobber (match_operand:SI 3 "register_operand" "=r"))]
+ (clobber (match_operand:SI 2 "register_operand" "=&r"))
+ (clobber (match_operand:SI 3 "register_operand" "=&r"))]
"!TARGET_BWX && (reload_in_progress || reload_completed)"
"#"
"!TARGET_BWX && reload_completed"
@@ -5984,16 +5984,38 @@
[(set_attr "type" "jsr")
(set_attr "length" "*,*,8")])
-(define_insn_and_split "call_value_osf_tlsgd"
+(define_int_iterator TLS_CALL
+ [UNSPEC_TLSGD_CALL
+ UNSPEC_TLSLDM_CALL])
+
+(define_int_attr tls
+ [(UNSPEC_TLSGD_CALL "tlsgd")
+ (UNSPEC_TLSLDM_CALL "tlsldm")])
+
+(define_insn "call_value_osf_<tls>"
[(set (match_operand 0)
(call (mem:DI (match_operand:DI 1 "symbolic_operand"))
(const_int 0)))
- (unspec [(match_operand:DI 2 "const_int_operand")] UNSPEC_TLSGD_CALL)
+ (unspec [(match_operand:DI 2 "const_int_operand")] TLS_CALL)
(use (reg:DI 29))
(clobber (reg:DI 26))]
"HAVE_AS_TLS"
- "#"
- "&& reload_completed"
+ "ldq $27,%1($29)\t\t!literal!%2\;jsr $26,($27),%1\t\t!lituse_<tls>!%2\;ldah $29,0($26)\t\t!gpdisp!%*\;lda $29,0($29)\t\t!gpdisp!%*"
+ [(set_attr "type" "jsr")
+ (set_attr "length" "16")])
+
+;; We must use peep2 instead of a split because we need accurate life
+;; information for $gp.
+(define_peephole2
+ [(parallel
+ [(set (match_operand 0)
+ (call (mem:DI (match_operand:DI 1 "symbolic_operand"))
+ (const_int 0)))
+ (unspec [(match_operand:DI 2 "const_int_operand")] TLS_CALL)
+ (use (reg:DI 29))
+ (clobber (reg:DI 26))])]
+ "HAVE_AS_TLS && reload_completed
+ && peep2_regno_dead_p (1, 29)"
[(set (match_dup 3)
(unspec:DI [(match_dup 5)
(match_dup 1)
@@ -6001,10 +6023,9 @@
(parallel [(set (match_dup 0)
(call (mem:DI (match_dup 3))
(const_int 0)))
- (set (match_dup 5)
- (unspec:DI [(match_dup 5) (match_dup 4)] UNSPEC_LDGP1))
+ (use (match_dup 5))
(use (match_dup 1))
- (use (unspec [(match_dup 2)] UNSPEC_TLSGD_CALL))
+ (use (unspec [(match_dup 2)] TLS_CALL))
(clobber (reg:DI 26))])
(set (match_dup 5)
(unspec:DI [(match_dup 5) (match_dup 4)] UNSPEC_LDGP2))]
@@ -6012,19 +6033,18 @@
operands[3] = gen_rtx_REG (Pmode, 27);
operands[4] = GEN_INT (alpha_next_sequence_number++);
operands[5] = pic_offset_table_rtx;
-}
- [(set_attr "type" "multi")])
+})
-(define_insn_and_split "call_value_osf_tlsldm"
- [(set (match_operand 0)
- (call (mem:DI (match_operand:DI 1 "symbolic_operand"))
- (const_int 0)))
- (unspec [(match_operand:DI 2 "const_int_operand")] UNSPEC_TLSLDM_CALL)
- (use (reg:DI 29))
- (clobber (reg:DI 26))]
- "HAVE_AS_TLS"
- "#"
- "&& reload_completed"
+(define_peephole2
+ [(parallel
+ [(set (match_operand 0)
+ (call (mem:DI (match_operand:DI 1 "symbolic_operand"))
+ (const_int 0)))
+ (unspec [(match_operand:DI 2 "const_int_operand")] TLS_CALL)
+ (use (reg:DI 29))
+ (clobber (reg:DI 26))])]
+ "HAVE_AS_TLS && reload_completed
+ && !peep2_regno_dead_p (1, 29)"
[(set (match_dup 3)
(unspec:DI [(match_dup 5)
(match_dup 1)
@@ -6035,7 +6055,7 @@
(set (match_dup 5)
(unspec:DI [(match_dup 5) (match_dup 4)] UNSPEC_LDGP1))
(use (match_dup 1))
- (use (unspec [(match_dup 2)] UNSPEC_TLSLDM_CALL))
+ (use (unspec [(match_dup 2)] TLS_CALL))
(clobber (reg:DI 26))])
(set (match_dup 5)
(unspec:DI [(match_dup 5) (match_dup 4)] UNSPEC_LDGP2))]
@@ -6043,8 +6063,7 @@
operands[3] = gen_rtx_REG (Pmode, 27);
operands[4] = GEN_INT (alpha_next_sequence_number++);
operands[5] = pic_offset_table_rtx;
-}
- [(set_attr "type" "multi")])
+})
(define_insn "*call_value_osf_1"
[(set (match_operand 0)
Index: gcc/config/s390/s390.c
===================================================================
--- a/src/gcc/config/s390/s390.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/config/s390/s390.c (.../branches/gcc-4_8-branch)
@@ -407,25 +407,10 @@
bytes on a z10 (or higher) CPU. */
#define PREDICT_DISTANCE (TARGET_Z10 ? 384 : 2048)
-static const int s390_hotpatch_trampoline_halfwords_default = 12;
-static const int s390_hotpatch_trampoline_halfwords_max = 1000000;
-static int s390_hotpatch_trampoline_halfwords = -1;
+static const int s390_hotpatch_hw_max = 1000000;
+static int s390_hotpatch_hw_before_label = 0;
+static int s390_hotpatch_hw_after_label = 0;
-/* Return the argument of the given hotpatch attribute or the default value if
- no argument is present. */
-
-static inline int
-get_hotpatch_attribute (tree hotpatch_attr)
-{
- const_tree args;
-
- args = TREE_VALUE (hotpatch_attr);
-
- return (args) ?
- TREE_INT_CST_LOW (TREE_VALUE (args)):
- s390_hotpatch_trampoline_halfwords_default;
-}
-
/* Check whether the hotpatch attribute is applied to a function and, if it has
an argument, the argument is valid. */
@@ -433,6 +418,10 @@
s390_handle_hotpatch_attribute (tree *node, tree name, tree args,
int flags ATTRIBUTE_UNUSED, bool *no_add_attrs)
{
+ tree expr;
+ tree expr2;
+ int err;
+
if (TREE_CODE (*node) != FUNCTION_DECL)
{
warning (OPT_Wattributes, "%qE attribute only applies to functions",
@@ -439,28 +428,38 @@
name);
*no_add_attrs = true;
}
- else if (args)
+ if (args != NULL && TREE_CHAIN (args) != NULL)
{
- tree expr = TREE_VALUE (args);
-
- if (TREE_CODE (expr) != INTEGER_CST
- || !INTEGRAL_TYPE_P (TREE_TYPE (expr))
- || TREE_INT_CST_HIGH (expr) != 0
- || TREE_INT_CST_LOW (expr) > (unsigned int)
- s390_hotpatch_trampoline_halfwords_max)
- {
- error ("requested %qE attribute is not a non-negative integer"
- " constant or too large (max. %d)", name,
- s390_hotpatch_trampoline_halfwords_max);
- *no_add_attrs = true;
- }
+ expr = TREE_VALUE (args);
+ expr2 = TREE_VALUE (TREE_CHAIN (args));
}
+ if (args == NULL || TREE_CHAIN (args) == NULL)
+ err = 1;
+ else if (TREE_CODE (expr) != INTEGER_CST
+ || !INTEGRAL_TYPE_P (TREE_TYPE (expr))
+ || TREE_INT_CST_HIGH (expr) != 0
+ || TREE_INT_CST_LOW (expr) > (unsigned int)s390_hotpatch_hw_max)
+ err = 1;
+ else if (TREE_CODE (expr2) != INTEGER_CST
+ || !INTEGRAL_TYPE_P (TREE_TYPE (expr2))
+ || TREE_INT_CST_HIGH (expr2) != 0
+ || TREE_INT_CST_LOW (expr2) > (unsigned int)s390_hotpatch_hw_max)
+ err = 1;
+ else
+ err = 0;
+ if (err)
+ {
+ error ("requested %qE attribute is not a comma separated pair of"
+ " non-negative integer constants or too large (max. %d)", name,
+ s390_hotpatch_hw_max);
+ *no_add_attrs = true;
+ }
return NULL_TREE;
}
static const struct attribute_spec s390_attribute_table[] = {
- { "hotpatch", 0, 1, true, false, false, s390_handle_hotpatch_attribute, false
+ { "hotpatch", 2, 2, true, false, false, s390_handle_hotpatch_attribute, false
},
/* End element. */
{ NULL, 0, 0, false, false, false, NULL, false }
@@ -1664,29 +1663,44 @@
{
switch (opt->opt_index)
{
- case OPT_mhotpatch:
- s390_hotpatch_trampoline_halfwords = (opt->value) ?
- s390_hotpatch_trampoline_halfwords_default : -1;
- break;
case OPT_mhotpatch_:
{
- int val;
+ int val1;
+ int val2;
+ char s[256];
+ char *t;
- val = integral_argument (opt->arg);
- if (val == -1)
+ strncpy (s, opt->arg, 256);
+ s[255] = 0;
+ t = strchr (s, ',');
+ if (t != NULL)
{
+ *t = 0;
+ t++;
+ val1 = integral_argument (s);
+ val2 = integral_argument (t);
+ }
+ else
+ {
+ val1 = -1;
+ val2 = -1;
+ }
+ if (val1 == -1 || val2 == -1)
+ {
/* argument is not a plain number */
- error ("argument to %qs should be a non-negative integer",
- "-mhotpatch=");
+ error ("arguments to %qs should be non-negative integers",
+ "-mhotpatch=n,m");
break;
}
- else if (val > s390_hotpatch_trampoline_halfwords_max)
+ else if (val1 > s390_hotpatch_hw_max
+ || val2 > s390_hotpatch_hw_max)
{
error ("argument to %qs is too large (max. %d)",
- "-mhotpatch=", s390_hotpatch_trampoline_halfwords_max);
+ "-mhotpatch=n,m", s390_hotpatch_hw_max);
break;
}
- s390_hotpatch_trampoline_halfwords = val;
+ s390_hotpatch_hw_before_label = val1;
+ s390_hotpatch_hw_after_label = val2;
break;
}
default:
@@ -5418,55 +5432,38 @@
gcc_unreachable ();
}
-/* Returns -1 if the function should not be made hotpatchable. Otherwise it
- returns a number >= 0 that is the desired size of the hotpatch trampoline
- in halfwords. */
+/* Assigns the number of NOP halfwords to be emitted before and after the
+ function label to *HW_BEFORE and *HW_AFTER. Both pointers must not be NULL.
+ If hotpatching is disabled for the function, the values are set to zero.
+*/
-static int s390_function_num_hotpatch_trampoline_halfwords (tree decl,
- bool do_warn)
+static void
+s390_function_num_hotpatch_hw (tree decl,
+ int *hw_before,
+ int *hw_after)
{
tree attr;
- if (DECL_DECLARED_INLINE_P (decl)
- || DECL_ARTIFICIAL (decl)
- || MAIN_NAME_P (DECL_NAME (decl)))
+ attr = lookup_attribute ("hotpatch", DECL_ATTRIBUTES (decl));
+
+ if (attr)
{
- /* - Explicitly inlined functions cannot be hotpatched.
- - Artificial functions need not be hotpatched.
- - Making the main function hotpatchable is useless. */
- return -1;
+ tree args = TREE_VALUE (attr);
+
+ /* If the hotpatch attribute is present, its values are used even if the
+ -mhotpatch cmdline option is used. */
+ *hw_before = TREE_INT_CST_LOW (TREE_VALUE (args));
+ *hw_after = TREE_INT_CST_LOW (TREE_VALUE (TREE_CHAIN (args)));
}
- attr = lookup_attribute ("hotpatch", DECL_ATTRIBUTES (decl));
- if (attr || s390_hotpatch_trampoline_halfwords >= 0)
+ else
{
- if (lookup_attribute ("always_inline", DECL_ATTRIBUTES (decl)))
- {
- if (do_warn)
- warning (OPT_Wattributes, "function %qE with the %qs attribute"
- " is not hotpatchable", DECL_NAME (decl), "always_inline");
- return -1;
- }
- else
- {
- return (attr) ?
- get_hotpatch_attribute (attr) : s390_hotpatch_trampoline_halfwords;
- }
+ /* Values specified by the -mhotpatch cmdline option. */
+ *hw_before = s390_hotpatch_hw_before_label;
+ *hw_after = s390_hotpatch_hw_after_label;
}
-
- return -1;
}
-/* Hook to determine if one function can safely inline another. */
-static bool
-s390_can_inline_p (tree caller, tree callee)
-{
- if (s390_function_num_hotpatch_trampoline_halfwords (callee, false) >= 0)
- return false;
-
- return default_target_can_inline_p (caller, callee);
-}
-
/* Write the extra assembler code needed to declare a function properly. */
void
@@ -5473,44 +5470,46 @@
s390_asm_output_function_label (FILE *asm_out_file, const char *fname,
tree decl)
{
- int hotpatch_trampoline_halfwords = -1;
+ int hw_before, hw_after;
- if (decl)
+ s390_function_num_hotpatch_hw (decl, &hw_before, &hw_after);
+ if (hw_before > 0)
{
- hotpatch_trampoline_halfwords =
- s390_function_num_hotpatch_trampoline_halfwords (decl, true);
- if (hotpatch_trampoline_halfwords >= 0
- && decl_function_context (decl) != NULL_TREE)
- {
- warning_at (DECL_SOURCE_LOCATION (decl), OPT_mhotpatch,
- "hotpatching is not compatible with nested functions");
- hotpatch_trampoline_halfwords = -1;
- }
- }
-
- if (hotpatch_trampoline_halfwords > 0)
- {
+ unsigned int function_alignment;
int i;
- /* Add a trampoline code area before the function label and initialize it
- with two-byte nop instructions. This area can be overwritten with code
+ /* Add trampoline code area before the function label and initialize it
+ with two-byte NOP instructions. This area can be overwritten with code
that jumps to a patched version of the function. */
- for (i = 0; i < hotpatch_trampoline_halfwords; i++)
- asm_fprintf (asm_out_file, "\tnopr\t%%r7\n");
+ asm_fprintf (asm_out_file, "\tnopr\t%%r7"
+ "\t# pre-label NOPs for hotpatch (%d halfwords)\n",
+ hw_before);
+ for (i = 1; i < hw_before; i++)
+ fputs ("\tnopr\t%r7\n", asm_out_file);
+
/* Note: The function label must be aligned so that (a) the bytes of the
- following nop do not cross a cacheline boundary, and (b) a jump address
+ following NOP do not cross a cacheline boundary, and (b) a jump address
(eight bytes for 64 bit targets, 4 bytes for 32 bit targets) can be
stored directly before the label without crossing a cacheline
boundary. All this is necessary to make sure the trampoline code can
- be changed atomically. */
+ be changed atomically.
+ This alignment is done automatically using the FOUNCTION_BOUNDARY
+ macro, but if there are NOPs before the function label, the alignment
+ is placed before them. So it is necessary to duplicate the alignment
+ after the NOPs. */
+ function_alignment = MAX (8, DECL_ALIGN (decl) / BITS_PER_UNIT);
+ if (! DECL_USER_ALIGN (decl))
+ function_alignment = MAX (function_alignment,
+ (unsigned int) align_functions);
+ fputs ("\t# alignment for hotpatch\n", asm_out_file);
+ ASM_OUTPUT_ALIGN (asm_out_file, floor_log2 (function_alignment));
}
ASM_OUTPUT_LABEL (asm_out_file, fname);
-
- /* Output a four-byte nop if hotpatching is enabled. This can be overwritten
- atomically with a relative backwards jump to the trampoline area. */
- if (hotpatch_trampoline_halfwords >= 0)
- asm_fprintf (asm_out_file, "\tnop\t0\n");
+ if (hw_after > 0)
+ asm_fprintf (asm_out_file,
+ "\t# post-label NOPs for hotpatch (%d halfwords)\n",
+ hw_after);
}
/* Output machine-dependent UNSPECs occurring in address constant X
@@ -11121,6 +11120,7 @@
s390_reorg (void)
{
bool pool_overflow = false;
+ int hw_before, hw_after;
/* Make sure all splits have been performed; splits after
machine_dependent_reorg might confuse insn length counts. */
@@ -11255,6 +11255,40 @@
if (insn_added_p)
shorten_branches (get_insns ());
}
+
+ s390_function_num_hotpatch_hw (current_function_decl, &hw_before, &hw_after);
+ if (hw_after > 0)
+ {
+ rtx insn;
+
+ /* Insert NOPs for hotpatching. */
+ for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
+ {
+ if (NOTE_P (insn) && NOTE_KIND (insn) == NOTE_INSN_FUNCTION_BEG)
+ break;
+ }
+ gcc_assert (insn);
+ /* Output a series of NOPs after the NOTE_INSN_FUNCTION_BEG. */
+ while (hw_after > 0)
+ {
+ if (hw_after >= 3 && TARGET_CPU_ZARCH)
+ {
+ insn = emit_insn_after (gen_nop_6_byte (), insn);
+ hw_after -= 3;
+ }
+ else if (hw_after >= 2)
+ {
+ insn = emit_insn_after (gen_nop_4_byte (), insn);
+ hw_after -= 2;
+ }
+ else
+ {
+ insn = emit_insn_after (gen_nop_2_byte (), insn);
+ hw_after -= 1;
+ }
+ }
+ gcc_assert (hw_after == 0);
+ }
}
/* Return true if INSN is a fp load insn writing register REGNO. */
@@ -11817,8 +11851,8 @@
#undef TARGET_ATTRIBUTE_TABLE
#define TARGET_ATTRIBUTE_TABLE s390_attribute_table
-#undef TARGET_CAN_INLINE_P
-#define TARGET_CAN_INLINE_P s390_can_inline_p
+#undef TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P
+#define TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P hook_bool_const_tree_true
struct gcc_target targetm = TARGET_INITIALIZER;
Index: gcc/config/s390/s390.md
===================================================================
--- a/src/gcc/config/s390/s390.md (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/config/s390/s390.md (.../branches/gcc-4_8-branch)
@@ -145,6 +145,11 @@
UNSPECV_CAS
UNSPECV_ATOMIC_OP
+ ; Hotpatching (unremovable NOPs)
+ UNSPECV_NOP_2_BYTE
+ UNSPECV_NOP_4_BYTE
+ UNSPECV_NOP_6_BYTE
+
; Transactional Execution support
UNSPECV_TBEGIN
UNSPECV_TBEGIN_TDB
@@ -9440,7 +9445,27 @@
"lr\t1,1"
[(set_attr "op_type" "RR")])
+;;- Undeletable nops (used for hotpatching)
+(define_insn "nop_2_byte"
+ [(unspec_volatile [(const_int 0)] UNSPECV_NOP_2_BYTE)]
+ ""
+ "nopr\t%%r7"
+ [(set_attr "op_type" "RR")])
+
+(define_insn "nop_4_byte"
+ [(unspec_volatile [(const_int 0)] UNSPECV_NOP_4_BYTE)]
+ ""
+ "nop\t0"
+ [(set_attr "op_type" "RX")])
+
+(define_insn "nop_6_byte"
+ [(unspec_volatile [(const_int 0)] UNSPECV_NOP_6_BYTE)]
+ "TARGET_CPU_ZARCH"
+ "brcl\t0, 0"
+ [(set_attr "op_type" "RIL")])
+
+
;
; Special literal pool access instruction pattern(s).
;
Index: gcc/config/s390/s390.opt
===================================================================
--- a/src/gcc/config/s390/s390.opt (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/config/s390/s390.opt (.../branches/gcc-4_8-branch)
@@ -96,13 +96,15 @@
Target Report RejectNegative Negative(msoft-float) InverseMask(SOFT_FLOAT, HARD_FLOAT)
Enable hardware floating point
-mhotpatch
-Target Report Var(s390_deferred_options) Defer
-Prepend the function label with 12 two-byte Nop instructions, and add a four byte Nop instruction after the label for hotpatching.
-
mhotpatch=
Target RejectNegative Report Joined Var(s390_deferred_options) Defer
-Prepend the function label with the given number of two-byte Nop instructions, and add a four byte Nop instruction after the label for hotpatching.
+Takes two non-negative integer numbers separated by a comma.
+Prepend the function label with the number of two-byte Nop
+instructions indicated by the first. Append Nop instructions
+covering the number of halfwords indicated by the second after the
+label. Nop instructions of the largest possible size are used
+(six, four or two bytes), beginning with the largest possible
+size. Using 0 for both values disables hotpatching.
mlong-double-128
Target Report RejectNegative Negative(mlong-double-64) Mask(LONG_DOUBLE_128)
Index: gcc/config/i386/i386.md
===================================================================
--- a/src/gcc/config/i386/i386.md (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/config/i386/i386.md (.../branches/gcc-4_8-branch)
@@ -1945,7 +1945,8 @@
(const_string "ssemov")
(eq_attr "alternative" "15,16")
(const_string "ssecvt")
- (match_operand 1 "pic_32bit_operand")
+ (and (match_operand 0 "register_operand")
+ (match_operand 1 "pic_32bit_operand"))
(const_string "lea")
]
(const_string "imov")))
@@ -2171,7 +2172,8 @@
(const_string "sselog1")
(eq_attr "alternative" "7,8,9,10,11")
(const_string "ssemov")
- (match_operand 1 "pic_32bit_operand")
+ (and (match_operand 0 "register_operand")
+ (match_operand 1 "pic_32bit_operand"))
(const_string "lea")
]
(const_string "imov")))
Index: gcc/config/i386/avx2intrin.h
===================================================================
--- a/src/gcc/config/i386/avx2intrin.h (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/config/i386/avx2intrin.h (.../branches/gcc-4_8-branch)
@@ -639,11 +639,20 @@
#ifdef __OPTIMIZE__
extern __inline __m256i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_bslli_epi128 (__m256i __A, const int __N)
+{
+ return (__m256i)__builtin_ia32_pslldqi256 (__A, __N * 8);
+}
+
+extern __inline __m256i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm256_slli_si256 (__m256i __A, const int __N)
{
return (__m256i)__builtin_ia32_pslldqi256 (__A, __N * 8);
}
#else
+#define _mm256_bslli_epi128(A, N) \
+ ((__m256i)__builtin_ia32_pslldqi256 ((__m256i)(A), (int)(N) * 8))
#define _mm256_slli_si256(A, N) \
((__m256i)__builtin_ia32_pslldqi256 ((__m256i)(A), (int)(N) * 8))
#endif
@@ -721,11 +730,20 @@
#ifdef __OPTIMIZE__
extern __inline __m256i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_bsrli_epi128 (__m256i __A, const int __N)
+{
+ return (__m256i)__builtin_ia32_psrldqi256 (__A, __N * 8);
+}
+
+extern __inline __m256i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm256_srli_si256 (__m256i __A, const int __N)
{
return (__m256i)__builtin_ia32_psrldqi256 (__A, __N * 8);
}
#else
+#define _mm256_bsrli_epi128(A, N) \
+ ((__m256i)__builtin_ia32_psrldqi256 ((__m256i)(A), (int)(N) * 8))
#define _mm256_srli_si256(A, N) \
((__m256i)__builtin_ia32_psrldqi256 ((__m256i)(A), (int)(N) * 8))
#endif
Index: gcc/config/i386/predicates.md
===================================================================
--- a/src/gcc/config/i386/predicates.md (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/config/i386/predicates.md (.../branches/gcc-4_8-branch)
@@ -806,11 +806,16 @@
;; a segment override. Defined as a special predicate to allow
;; mode-less const_int operands pass to address_operand.
(define_special_predicate "lea_address_operand"
- (match_operand 0 "address_operand")
+ (match_test "address_operand (op, VOIDmode)")
{
struct ix86_address parts;
int ok;
+ if (!CONST_INT_P (op)
+ && mode != VOIDmode
+ && GET_MODE (op) != mode)
+ return false;
+
ok = ix86_decompose_address (op, &parts);
gcc_assert (ok);
return parts.seg == SEG_DEFAULT;
@@ -823,7 +828,7 @@
;; Return true if op if a valid base register, displacement or
;; sum of base register and displacement for VSIB addressing.
(define_predicate "vsib_address_operand"
- (match_operand 0 "address_operand")
+ (match_test "address_operand (op, VOIDmode)")
{
struct ix86_address parts;
int ok;
Index: gcc/config/i386/sse.md
===================================================================
--- a/src/gcc/config/i386/sse.md (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/config/i386/sse.md (.../branches/gcc-4_8-branch)
@@ -3117,7 +3117,7 @@
(define_expand "vec_unpacks_hi_v8sf"
[(set (match_dup 2)
(vec_select:V4SF
- (match_operand:V8SF 1 "nonimmediate_operand")
+ (match_operand:V8SF 1 "register_operand")
(parallel [(const_int 4) (const_int 5)
(const_int 6) (const_int 7)])))
(set (match_operand:V4DF 0 "register_operand")
@@ -7369,7 +7369,7 @@
movss\t{%2, %0|%0, %2}
movss\t{%2, %0|%0, %2}
vmovss\t{%2, %1, %0|%0, %1, %2}"
- [(set_attr "isa" "sse2,*,noavx,noavx,avx")
+ [(set_attr "isa" "sse2,sse2,noavx,noavx,avx")
(set_attr "type" "ssemov")
(set_attr "prefix" "maybe_vex,maybe_vex,orig,orig,vex")
(set_attr "mode" "TI,TI,V4SF,SF,SF")])
Index: gcc/config/i386/emmintrin.h
===================================================================
--- a/src/gcc/config/i386/emmintrin.h (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/config/i386/emmintrin.h (.../branches/gcc-4_8-branch)
@@ -1143,6 +1143,18 @@
#ifdef __OPTIMIZE__
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm_bsrli_si128 (__m128i __A, const int __N)
+{
+ return (__m128i)__builtin_ia32_psrldqi128 (__A, __N * 8);
+}
+
+extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm_bslli_si128 (__m128i __A, const int __N)
+{
+ return (__m128i)__builtin_ia32_pslldqi128 (__A, __N * 8);
+}
+
+extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_srli_si128 (__m128i __A, const int __N)
{
return (__m128i)__builtin_ia32_psrldqi128 (__A, __N * 8);
@@ -1154,6 +1166,10 @@
return (__m128i)__builtin_ia32_pslldqi128 (__A, __N * 8);
}
#else
+#define _mm_bsrli_si128(A, N) \
+ ((__m128i)__builtin_ia32_psrldqi128 ((__m128i)(A), (int)(N) * 8))
+#define _mm_bslli_si128(A, N) \
+ ((__m128i)__builtin_ia32_pslldqi128 ((__m128i)(A), (int)(N) * 8))
#define _mm_srli_si128(A, N) \
((__m128i)__builtin_ia32_psrldqi128 ((__m128i)(A), (int)(N) * 8))
#define _mm_slli_si128(A, N) \
Index: gcc/config/i386/i386.c
===================================================================
--- a/src/gcc/config/i386/i386.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/config/i386/i386.c (.../branches/gcc-4_8-branch)
@@ -5539,7 +5539,18 @@
if (abi == SYSV_ABI)
{
if (lookup_attribute ("ms_abi", TYPE_ATTRIBUTES (fntype)))
- abi = MS_ABI;
+ {
+ if (TARGET_X32)
+ {
+ static bool warned = false;
+ if (!warned)
+ {
+ error ("X32 does not support ms_abi attribute");
+ warned = true;
+ }
+ }
+ abi = MS_ABI;
+ }
}
else if (lookup_attribute ("sysv_abi", TYPE_ATTRIBUTES (fntype)))
abi = SYSV_ABI;
@@ -10483,6 +10494,10 @@
if (sp_is_cfa_reg)
m->fs.cfa_offset += UNITS_PER_WORD;
RTX_FRAME_RELATED_P (insn) = 1;
+ add_reg_note (insn, REG_FRAME_RELATED_EXPR,
+ gen_rtx_SET (VOIDmode, stack_pointer_rtx,
+ plus_constant (Pmode, stack_pointer_rtx,
+ -UNITS_PER_WORD)));
}
}
@@ -10496,6 +10511,10 @@
if (sp_is_cfa_reg)
m->fs.cfa_offset += UNITS_PER_WORD;
RTX_FRAME_RELATED_P (insn) = 1;
+ add_reg_note (insn, REG_FRAME_RELATED_EXPR,
+ gen_rtx_SET (VOIDmode, stack_pointer_rtx,
+ plus_constant (Pmode, stack_pointer_rtx,
+ -UNITS_PER_WORD)));
}
}
Index: gcc/config/sh/t-sh
===================================================================
--- a/src/gcc/config/sh/t-sh (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/config/sh/t-sh (.../branches/gcc-4_8-branch)
@@ -51,8 +51,12 @@
done \
done)
-# SH1 only supports big endian.
+# SH1 and SH2A support big endian only.
+ifeq ($(DEFAULT_ENDIAN),ml)
+MULTILIB_EXCEPTIONS = m1 ml/m1 m2a* ml/m2a* $(TM_MULTILIB_EXCEPTIONS_CONFIG)
+else
MULTILIB_EXCEPTIONS = ml/m1 ml/m2a* $(TM_MULTILIB_EXCEPTIONS_CONFIG)
+endif
MULTILIB_OSDIRNAMES = \
$(OTHER_ENDIAN)=!$(OTHER_ENDIAN) \
Index: gcc/config/sh/sh.md
===================================================================
--- a/src/gcc/config/sh/sh.md (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/config/sh/sh.md (.../branches/gcc-4_8-branch)
@@ -651,32 +651,6 @@
"tst #255,%0"
[(set_attr "type" "mt_group")])
-;; This pattern might be risky because it also tests the upper bits and not
-;; only the subreg. However, it seems that combine will get to this only
-;; when testing sign/zero extended values. In this case the extended upper
-;; bits do not matter.
-(define_insn "*tst<mode>_t_zero"
- [(set (reg:SI T_REG)
- (eq:SI
- (subreg:QIHI
- (and:SI (match_operand:SI 0 "arith_reg_operand" "%r")
- (match_operand:SI 1 "arith_reg_operand" "r")) <lowpart_le>)
- (const_int 0)))]
- "TARGET_SH1 && TARGET_LITTLE_ENDIAN"
- "tst %0,%1"
- [(set_attr "type" "mt_group")])
-
-(define_insn "*tst<mode>_t_zero"
- [(set (reg:SI T_REG)
- (eq:SI
- (subreg:QIHI
- (and:SI (match_operand:SI 0 "arith_reg_operand" "%r")
- (match_operand:SI 1 "arith_reg_operand" "r")) <lowpart_be>)
- (const_int 0)))]
- "TARGET_SH1 && !TARGET_LITTLE_ENDIAN"
- "tst %0,%1"
- [(set_attr "type" "mt_group")])
-
;; Extract LSB, negate and store in T bit.
(define_insn "tstsi_t_and_not"
[(set (reg:SI T_REG)
@@ -5649,7 +5623,7 @@
(define_insn "swapbsi2"
[(set (match_operand:SI 0 "arith_reg_dest" "=r")
(ior:SI (and:SI (match_operand:SI 1 "arith_reg_operand" "r")
- (const_int 4294901760))
+ (const_int -65536)) ;; 0xFFFF0000
(ior:SI (and:SI (ashift:SI (match_dup 1) (const_int 8))
(const_int 65280))
(and:SI (ashiftrt:SI (match_dup 1) (const_int 8))
@@ -5717,7 +5691,7 @@
(define_peephole2
[(set (match_operand:SI 0 "arith_reg_dest" "")
(ior:SI (and:SI (match_operand:SI 1 "arith_reg_operand" "")
- (const_int 4294901760))
+ (const_int -65536)) ;; 0xFFFF0000
(ior:SI (and:SI (ashift:SI (match_dup 1) (const_int 8))
(const_int 65280))
(and:SI (ashiftrt:SI (match_dup 1) (const_int 8))
@@ -5727,7 +5701,7 @@
"TARGET_SH1 && peep2_reg_dead_p (2, operands[0])"
[(set (match_dup 2)
(ior:SI (and:SI (match_operand:SI 1 "arith_reg_operand" "")
- (const_int 4294901760))
+ (const_int -65536)) ;; 0xFFFF0000
(ior:SI (and:SI (ashift:SI (match_dup 1) (const_int 8))
(const_int 65280))
(and:SI (ashiftrt:SI (match_dup 1) (const_int 8))
Index: gcc/config/avr/avr.md
===================================================================
--- a/src/gcc/config/avr/avr.md (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/config/avr/avr.md (.../branches/gcc-4_8-branch)
@@ -351,6 +351,13 @@
push __zero_reg__"
[(set_attr "length" "1,1")])
+(define_insn "pushhi1_insn"
+ [(set (mem:HI (post_dec:HI (reg:HI REG_SP)))
+ (match_operand:HI 0 "register_operand" "r"))]
+ ""
+ "push %B0\;push %A0"
+ [(set_attr "length" "2")])
+
;; All modes for a multi-byte push. We must include complex modes here too,
;; lest emit_single_push_insn "helpfully" create the auto-inc itself.
(define_mode_iterator MPUSH
@@ -366,18 +373,43 @@
[(match_operand:MPUSH 0 "" "")]
""
{
- int i;
-
- // Avoid (subreg (mem)) for non-generic address spaces below. Because
- // of the poor addressing capabilities of these spaces it's better to
- // load them in one chunk. And it avoids PR61443.
-
if (MEM_P (operands[0])
&& !ADDR_SPACE_GENERIC_P (MEM_ADDR_SPACE (operands[0])))
- operands[0] = copy_to_mode_reg (<MODE>mode, operands[0]);
+ {
+ // Avoid (subreg (mem)) for non-generic address spaces. Because
+ // of the poor addressing capabilities of these spaces it's better to
+ // load them in one chunk. And it avoids PR61443.
- for (i = GET_MODE_SIZE (<MODE>mode) - 1; i >= 0; --i)
+ operands[0] = copy_to_mode_reg (<MODE>mode, operands[0]);
+ }
+ else if (REG_P (operands[0])
+ && IN_RANGE (REGNO (operands[0]), FIRST_VIRTUAL_REGISTER,
+ LAST_VIRTUAL_REGISTER))
{
+ // Byte-wise pushing of virtual regs might result in something like
+ //
+ // (set (mem:QI (post_dec:HI (reg:HI 32 SP)))
+ // (subreg:QI (plus:HI (reg:HI 28)
+ // (const_int 17)) 0))
+ //
+ // after elimination. This cannot be handled by reload, cf. PR64452.
+ // Reload virtuals in one chunk. That way it's possible to reload
+ // above situation and finally
+ //
+ // (set (reg:HI **)
+ // (const_int 17))
+ // (set (reg:HI **)
+ // (plus:HI (reg:HI **)
+ // (reg:HI 28)))
+ // (set (mem:HI (post_dec:HI (reg:HI 32 SP))
+ // (reg:HI **)))
+
+ emit_insn (gen_pushhi1_insn (operands[0]));
+ DONE;
+ }
+
+ for (int i = GET_MODE_SIZE (<MODE>mode) - 1; i >= 0; --i)
+ {
rtx part = simplify_gen_subreg (QImode, operands[0], <MODE>mode, i);
if (part != const0_rtx)
part = force_reg (QImode, part);
Index: gcc/config/avr/avr.c
===================================================================
--- a/src/gcc/config/avr/avr.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/config/avr/avr.c (.../branches/gcc-4_8-branch)
@@ -7578,7 +7578,8 @@
It is easier to state this in an insn attribute "adjust_len" than
to clutter up code here... */
- if (-1 == recog_memoized (insn))
+ if (!NONDEBUG_INSN_P (insn)
+ || -1 == recog_memoized (insn))
{
return len;
}
Index: gcc/config/rs6000/t-fprules
===================================================================
--- a/src/gcc/config/rs6000/t-fprules (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/config/rs6000/t-fprules (.../branches/gcc-4_8-branch)
@@ -18,9 +18,3 @@
SOFT_FLOAT_CPUS = e300c2 401 403 405 440 464 476 ec603e 801 821 823 860
MULTILIB_MATCHES_FLOAT = $(foreach cpu, $(SOFT_FLOAT_CPUS), msoft-float=mcpu?$(cpu))
-
-# Build the libraries for both hard and soft floating point by default
-
-MULTILIB_OPTIONS = msoft-float
-MULTILIB_DIRNAMES = soft-float
-MULTILIB_MATCHES = ${MULTILIB_MATCHES_FLOAT}
Index: gcc/config/rs6000/rs6000-tables.opt
===================================================================
--- a/src/gcc/config/rs6000/rs6000-tables.opt (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/config/rs6000/rs6000-tables.opt (.../branches/gcc-4_8-branch)
@@ -186,5 +186,8 @@
Enum(rs6000_cpu_opt_value) String(powerpc64) Value(52)
EnumValue
-Enum(rs6000_cpu_opt_value) String(rs64) Value(53)
+Enum(rs6000_cpu_opt_value) String(powerpc64le) Value(53)
+EnumValue
+Enum(rs6000_cpu_opt_value) String(rs64) Value(54)
+
Index: gcc/config/rs6000/htm.md
===================================================================
--- a/src/gcc/config/rs6000/htm.md (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/config/rs6000/htm.md (.../branches/gcc-4_8-branch)
@@ -245,7 +245,7 @@
(unspec_volatile:CC [(match_operand 0 "u3bit_cint_operand" "n")]
UNSPECV_HTM_TCHECK))]
"TARGET_HTM"
- "tcheck. %0"
+ "tcheck %0"
[(set_attr "type" "htm")
(set_attr "length" "4")])
Index: gcc/config/rs6000/rs6000-cpus.def
===================================================================
--- a/src/gcc/config/rs6000/rs6000-cpus.def (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/config/rs6000/rs6000-cpus.def (.../branches/gcc-4_8-branch)
@@ -1,5 +1,5 @@
/* IBM RS/6000 CPU names..
- Copyright (C) 1991-2013 Free Software Foundation, Inc.
+ Copyright (C) 1991-2015 Free Software Foundation, Inc.
Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
This file is part of GCC.
@@ -91,6 +91,7 @@
| OPTION_MASK_PPC_GFXOPT \
| OPTION_MASK_PPC_GPOPT \
| OPTION_MASK_QUAD_MEMORY \
+ | OPTION_MASK_QUAD_MEMORY_ATOMIC \
| OPTION_MASK_RECIP_PRECISION \
| OPTION_MASK_SOFT_FLOAT \
| OPTION_MASK_STRICT_ALIGN_OPTIONAL \
@@ -188,4 +189,5 @@
RS6000_CPU ("power8", PROCESSOR_POWER8, MASK_POWERPC64 | ISA_2_7_MASKS_SERVER)
RS6000_CPU ("powerpc", PROCESSOR_POWERPC, 0)
RS6000_CPU ("powerpc64", PROCESSOR_POWERPC64, MASK_PPC_GFXOPT | MASK_POWERPC64)
+RS6000_CPU ("powerpc64le", PROCESSOR_POWER8, MASK_POWERPC64 | ISA_2_7_MASKS_SERVER)
RS6000_CPU ("rs64", PROCESSOR_RS64A, MASK_PPC_GFXOPT | MASK_POWERPC64)
Index: gcc/config/rs6000/t-linux
===================================================================
--- a/src/gcc/config/rs6000/t-linux (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/config/rs6000/t-linux (.../branches/gcc-4_8-branch)
@@ -1,9 +1,19 @@
# do not define the multiarch name if configured for a soft-float cpu
# or soft-float.
ifeq (,$(filter $(with_cpu),$(SOFT_FLOAT_CPUS))$(findstring soft,$(with_float)))
+ifneq (,$(findstring powerpc64,$(target)))
+MULTILIB_OSDIRNAMES := .=../lib64$(call if_multiarch,:powerpc64-linux-gnu)
+else
ifneq (,$(findstring spe,$(target)))
-MULTIARCH_DIRNAME = powerpc-linux-gnuspe$(if $(findstring rs6000/e500-double.h, $(tm_file_list)),,v1)
+MULTIARCH_DIRNAME := powerpc-linux-gnuspe$(if $(findstring rs6000/e500-double.h, $(tm_file_list)),,v1)
else
-MULTIARCH_DIRNAME = powerpc-linux-gnu
+MULTIARCH_DIRNAME := powerpc-linux-gnu
endif
endif
+ifneq (,$(findstring powerpcle,$(target)))
+MULTIARCH_DIRNAME := $(subst -linux,le-linux,$(MULTIARCH_DIRNAME))
+endif
+ifneq (,$(findstring powerpc64le,$(target)))
+MULTILIB_OSDIRNAMES := $(subst -linux,le-linux,$(MULTILIB_OSDIRNAMES))
+endif
+endif
Index: gcc/config/rs6000/default64.h
===================================================================
--- a/src/gcc/config/rs6000/default64.h (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/config/rs6000/default64.h (.../branches/gcc-4_8-branch)
@@ -1,6 +1,6 @@
/* Definitions of target machine for GNU compiler,
for 64 bit powerpc linux defaulting to -m64.
- Copyright (C) 2003-2013 Free Software Foundation, Inc.
+ Copyright (C) 2003-2015 Free Software Foundation, Inc.
This file is part of GCC.
@@ -18,10 +18,14 @@
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define RS6000_CPU(NAME, CPU, FLAGS)
+#include "rs6000-cpus.def"
+#undef RS6000_CPU
+
#if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN)
#undef TARGET_DEFAULT
-#define TARGET_DEFAULT (MASK_PPC_GFXOPT | MASK_POWERPC64 | MASK_64BIT | MASK_LITTLE_ENDIAN)
+#define TARGET_DEFAULT (ISA_2_7_MASKS_SERVER | MASK_POWERPC64 | MASK_64BIT | MASK_LITTLE_ENDIAN)
#else
#undef TARGET_DEFAULT
-#define TARGET_DEFAULT (MASK_PPC_GFXOPT | MASK_POWERPC64 | MASK_64BIT)
+#define TARGET_DEFAULT (MASK_PPC_GFXOPT | MASK_PPC_GPOPT | MASK_MFCRF | MASK_POWERPC64 | MASK_64BIT)
#endif
Index: gcc/config/rs6000/rs6000-builtin.def
===================================================================
--- a/src/gcc/config/rs6000/rs6000-builtin.def (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/config/rs6000/rs6000-builtin.def (.../branches/gcc-4_8-branch)
@@ -392,6 +392,14 @@
| RS6000_BTC_BINARY), \
CODE_FOR_ ## ICODE) /* ICODE */
+#define BU_CRYPTO_2A(ENUM, NAME, ATTR, ICODE) \
+ RS6000_BUILTIN_2 (CRYPTO_BUILTIN_ ## ENUM, /* ENUM */ \
+ "__builtin_crypto_" NAME, /* NAME */ \
+ RS6000_BTM_P8_VECTOR, /* MASK */ \
+ (RS6000_BTC_ ## ATTR /* ATTR */ \
+ | RS6000_BTC_BINARY), \
+ CODE_FOR_ ## ICODE) /* ICODE */
+
#define BU_CRYPTO_3(ENUM, NAME, ATTR, ICODE) \
RS6000_BUILTIN_3 (CRYPTO_BUILTIN_ ## ENUM, /* ENUM */ \
"__builtin_crypto_" NAME, /* NAME */ \
@@ -400,6 +408,14 @@
| RS6000_BTC_TERNARY), \
CODE_FOR_ ## ICODE) /* ICODE */
+#define BU_CRYPTO_3A(ENUM, NAME, ATTR, ICODE) \
+ RS6000_BUILTIN_3 (CRYPTO_BUILTIN_ ## ENUM, /* ENUM */ \
+ "__builtin_crypto_" NAME, /* NAME */ \
+ RS6000_BTM_P8_VECTOR, /* MASK */ \
+ (RS6000_BTC_ ## ATTR /* ATTR */ \
+ | RS6000_BTC_TERNARY), \
+ CODE_FOR_ ## ICODE) /* ICODE */
+
#define BU_CRYPTO_OVERLOAD_1(ENUM, NAME) \
RS6000_BUILTIN_1 (CRYPTO_BUILTIN_ ## ENUM, /* ENUM */ \
"__builtin_crypto_" NAME, /* NAME */ \
@@ -408,10 +424,10 @@
| RS6000_BTC_UNARY), \
CODE_FOR_nothing) /* ICODE */
-#define BU_CRYPTO_OVERLOAD_2(ENUM, NAME) \
+#define BU_CRYPTO_OVERLOAD_2A(ENUM, NAME) \
RS6000_BUILTIN_2 (CRYPTO_BUILTIN_ ## ENUM, /* ENUM */ \
"__builtin_crypto_" NAME, /* NAME */ \
- RS6000_BTM_CRYPTO, /* MASK */ \
+ RS6000_BTM_P8_VECTOR, /* MASK */ \
(RS6000_BTC_OVERLOADED /* ATTR */ \
| RS6000_BTC_BINARY), \
CODE_FOR_nothing) /* ICODE */
@@ -424,6 +440,14 @@
| RS6000_BTC_TERNARY), \
CODE_FOR_nothing) /* ICODE */
+#define BU_CRYPTO_OVERLOAD_3A(ENUM, NAME) \
+ RS6000_BUILTIN_3 (CRYPTO_BUILTIN_ ## ENUM, /* ENUM */ \
+ "__builtin_crypto_" NAME, /* NAME */ \
+ RS6000_BTM_P8_VECTOR, /* MASK */ \
+ (RS6000_BTC_OVERLOADED /* ATTR */ \
+ | RS6000_BTC_TERNARY), \
+ CODE_FOR_nothing) /* ICODE */
+
/* HTM convenience macros. */
#define BU_HTM_0(ENUM, NAME, ATTR, ICODE) \
RS6000_BUILTIN_H (HTM_BUILTIN_ ## ENUM, /* ENUM */ \
@@ -1611,24 +1635,24 @@
BU_CRYPTO_2 (VCIPHERLAST, "vcipherlast", CONST, crypto_vcipherlast)
BU_CRYPTO_2 (VNCIPHER, "vncipher", CONST, crypto_vncipher)
BU_CRYPTO_2 (VNCIPHERLAST, "vncipherlast", CONST, crypto_vncipherlast)
-BU_CRYPTO_2 (VPMSUMB, "vpmsumb", CONST, crypto_vpmsumb)
-BU_CRYPTO_2 (VPMSUMH, "vpmsumh", CONST, crypto_vpmsumh)
-BU_CRYPTO_2 (VPMSUMW, "vpmsumw", CONST, crypto_vpmsumw)
-BU_CRYPTO_2 (VPMSUMD, "vpmsumd", CONST, crypto_vpmsumd)
+BU_CRYPTO_2A (VPMSUMB, "vpmsumb", CONST, crypto_vpmsumb)
+BU_CRYPTO_2A (VPMSUMH, "vpmsumh", CONST, crypto_vpmsumh)
+BU_CRYPTO_2A (VPMSUMW, "vpmsumw", CONST, crypto_vpmsumw)
+BU_CRYPTO_2A (VPMSUMD, "vpmsumd", CONST, crypto_vpmsumd)
/* 3 argument crypto functions. */
-BU_CRYPTO_3 (VPERMXOR_V2DI, "vpermxor_v2di", CONST, crypto_vpermxor_v2di)
-BU_CRYPTO_3 (VPERMXOR_V4SI, "vpermxor_v4si", CONST, crypto_vpermxor_v4si)
-BU_CRYPTO_3 (VPERMXOR_V8HI, "vpermxor_v8hi", CONST, crypto_vpermxor_v8hi)
-BU_CRYPTO_3 (VPERMXOR_V16QI, "vpermxor_v16qi", CONST, crypto_vpermxor_v16qi)
+BU_CRYPTO_3A (VPERMXOR_V2DI, "vpermxor_v2di", CONST, crypto_vpermxor_v2di)
+BU_CRYPTO_3A (VPERMXOR_V4SI, "vpermxor_v4si", CONST, crypto_vpermxor_v4si)
+BU_CRYPTO_3A (VPERMXOR_V8HI, "vpermxor_v8hi", CONST, crypto_vpermxor_v8hi)
+BU_CRYPTO_3A (VPERMXOR_V16QI, "vpermxor_v16qi", CONST, crypto_vpermxor_v16qi)
BU_CRYPTO_3 (VSHASIGMAW, "vshasigmaw", CONST, crypto_vshasigmaw)
BU_CRYPTO_3 (VSHASIGMAD, "vshasigmad", CONST, crypto_vshasigmad)
/* 2 argument crypto overloaded functions. */
-BU_CRYPTO_OVERLOAD_2 (VPMSUM, "vpmsum")
+BU_CRYPTO_OVERLOAD_2A (VPMSUM, "vpmsum")
/* 3 argument crypto overloaded functions. */
-BU_CRYPTO_OVERLOAD_3 (VPERMXOR, "vpermxor")
+BU_CRYPTO_OVERLOAD_3A (VPERMXOR, "vpermxor")
BU_CRYPTO_OVERLOAD_3 (VSHASIGMA, "vshasigma")
Index: gcc/config/rs6000/rs6000.opt
===================================================================
--- a/src/gcc/config/rs6000/rs6000.opt (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/config/rs6000/rs6000.opt (.../branches/gcc-4_8-branch)
@@ -1,6 +1,6 @@
; Options for the rs6000 port of the compiler
;
-; Copyright (C) 2005-2014 Free Software Foundation, Inc.
+; Copyright (C) 2005-2015 Free Software Foundation, Inc.
; Contributed by Aldy Hernandez <aldy@quesejoda.com>.
;
; This file is part of GCC.
@@ -201,31 +201,35 @@
Target Undocumented Report Alias(mupper-regs-df)
mvsx-align-128
-Target Undocumented Report Var(TARGET_VSX_ALIGN_128)
+Target Undocumented Report Var(TARGET_VSX_ALIGN_128) Save
; If -mvsx, set alignment to 128 bits instead of 32/64
mallow-movmisalign
-Target Undocumented Var(TARGET_ALLOW_MOVMISALIGN) Init(-1)
+Target Undocumented Var(TARGET_ALLOW_MOVMISALIGN) Init(-1) Save
; Allow/disallow the movmisalign in DF/DI vectors
+mefficient-unaligned-vector
+Target Undocumented Report Var(TARGET_EFFICIENT_UNALIGNED_VSX) Init(-1) Save
+; Consider unaligned VSX accesses to be efficient/inefficient
+
mallow-df-permute
-Target Undocumented Var(TARGET_ALLOW_DF_PERMUTE)
+Target Undocumented Var(TARGET_ALLOW_DF_PERMUTE) Save
; Allow/disallow permutation of DF/DI vectors
msched-groups
-Target Undocumented Report Var(TARGET_SCHED_GROUPS) Init(-1)
+Target Undocumented Report Var(TARGET_SCHED_GROUPS) Init(-1) Save
; Explicitly set/unset whether rs6000_sched_groups is set
malways-hint
-Target Undocumented Report Var(TARGET_ALWAYS_HINT) Init(-1)
+Target Undocumented Report Var(TARGET_ALWAYS_HINT) Init(-1) Save
; Explicitly set/unset whether rs6000_always_hint is set
malign-branch-targets
-Target Undocumented Report Var(TARGET_ALIGN_BRANCH_TARGETS) Init(-1)
+Target Undocumented Report Var(TARGET_ALIGN_BRANCH_TARGETS) Init(-1) Save
; Explicitly set/unset whether rs6000_align_branch_targets is set
mvectorize-builtins
-Target Undocumented Report Var(TARGET_VECTORIZE_BUILTINS) Init(-1)
+Target Undocumented Report Var(TARGET_VECTORIZE_BUILTINS) Init(-1) Save
; Explicitly control whether we vectorize the builtins or not.
mno-update
@@ -535,7 +539,7 @@
Use/do not use r11 to hold the static link in calls to functions via pointers.
msave-toc-indirect
-Target Report Var(TARGET_SAVE_TOC_INDIRECT) Save
+Target Report Mask(SAVE_TOC_INDIRECT) Var(rs6000_isa_flags)
Control whether we save the TOC in the prologue for indirect calls or generate the save inline
mvsx-timode
@@ -556,7 +560,7 @@
mcrypto
Target Report Mask(CRYPTO) Var(rs6000_isa_flags)
-Use ISA 2.07 crypto instructions
+Use ISA 2.07 Category:Vector.AES and Category:Vector.SHA2 instructions
mdirect-move
Target Report Mask(DIRECT_MOVE) Var(rs6000_isa_flags)
@@ -575,7 +579,7 @@
Generate the quad word memory atomic instructions (lqarx/stqcx).
mcompat-align-parm
-Target Report Var(rs6000_compat_align_parm) Init(1) Save
+Target Report Var(rs6000_compat_align_parm) Init(0) Save
Generate aggregate parameter passing code with at most 64-bit alignment.
mupper-regs-df
@@ -585,3 +589,7 @@
mupper-regs-sf
Target Undocumented Mask(UPPER_REGS_SF) Var(rs6000_isa_flags)
Allow float variables in upper registers with -mcpu=power8 or -mp8-vector
+
+moptimize-swaps
+Target Undocumented Var(rs6000_optimize_swaps) Init(1) Save
+Analyze and remove doubleword swaps from VSX computations.
Index: gcc/config/rs6000/linux64.h
===================================================================
--- a/src/gcc/config/rs6000/linux64.h (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/config/rs6000/linux64.h (.../branches/gcc-4_8-branch)
@@ -1,6 +1,6 @@
/* Definitions of target machine for GNU compiler,
for 64 bit PowerPC linux.
- Copyright (C) 2000-2013 Free Software Foundation, Inc.
+ Copyright (C) 2000-2015 Free Software Foundation, Inc.
This file is part of GCC.
@@ -71,11 +71,7 @@
#undef PROCESSOR_DEFAULT
#define PROCESSOR_DEFAULT PROCESSOR_POWER7
#undef PROCESSOR_DEFAULT64
-#ifdef LINUX64_DEFAULT_ABI_ELFv2
#define PROCESSOR_DEFAULT64 PROCESSOR_POWER8
-#else
-#define PROCESSOR_DEFAULT64 PROCESSOR_POWER7
-#endif
/* We don't need to generate entries in .fixup, except when
-mrelocatable or -mrelocatable-lib is given. */
@@ -101,7 +97,7 @@
{ \
if (!global_options_set.x_rs6000_alignment_flags) \
rs6000_alignment_flags = MASK_ALIGN_NATURAL; \
- if (TARGET_64BIT) \
+ if (rs6000_isa_flags & OPTION_MASK_64BIT) \
{ \
if (DEFAULT_ABI != ABI_AIX) \
{ \
Index: gcc/config/rs6000/rs6000.c
===================================================================
--- a/src/gcc/config/rs6000/rs6000.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/config/rs6000/rs6000.c (.../branches/gcc-4_8-branch)
@@ -1,5 +1,5 @@
/* Subroutines used for code generation on IBM RS/6000.
- Copyright (C) 1991-2014 Free Software Foundation, Inc.
+ Copyright (C) 1991-2015 Free Software Foundation, Inc.
Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
This file is part of GCC.
@@ -61,6 +61,7 @@
#include "tree-vectorizer.h"
#include "dumpfile.h"
#include "real.h"
+#include "tree-pass.h"
#if TARGET_XCOFF
#include "xcoffout.h" /* get declarations of xcoff_*_section_name */
#endif
@@ -1153,6 +1154,7 @@
enum machine_mode,
secondary_reload_info *,
bool);
+static unsigned int rs6000_analyze_swaps (function *);
/* Hash table stuff for keeping track of TOC entries. */
@@ -3139,7 +3141,13 @@
}
else
{
- const char *default_cpu = (TARGET_POWERPC64 ? "powerpc64" : "powerpc");
+ /* PowerPC 64-bit LE requires at least ISA 2.07. */
+ const char *default_cpu = ((!TARGET_POWERPC64)
+ ? "powerpc"
+ : ((BYTES_BIG_ENDIAN)
+ ? "powerpc64"
+ : "powerpc64le"));
+
rs6000_cpu_index = cpu_index = rs6000_cpu_name_lookup (default_cpu);
have_cpu = false;
}
@@ -3158,15 +3166,18 @@
& set_masks);
}
else
- rs6000_isa_flags |= (processor_target_table[cpu_index].target_enable
- & ~rs6000_isa_flags_explicit);
+ {
+ /* If no -mcpu=<xxx>, inherit any default options that were cleared via
+ POWERPC_MASKS. Originally, TARGET_DEFAULT was used to initialize
+ target_flags via the TARGET_DEFAULT_TARGET_FLAGS hook. When we switched
+ to using rs6000_isa_flags, we need to do the initialization here.
- /* If no -mcpu=<xxx>, inherit any default options that were cleared via
- POWERPC_MASKS. Originally, TARGET_DEFAULT was used to initialize
- target_flags via the TARGET_DEFAULT_TARGET_FLAGS hook. When we switched
- to using rs6000_isa_flags, we need to do the initialization here. */
- if (!have_cpu)
- rs6000_isa_flags |= (TARGET_DEFAULT & ~rs6000_isa_flags_explicit);
+ If there is a TARGET_DEFAULT, use that. Otherwise fall back to using
+ -mcpu=powerpc, -mcpu=powerpc64, or -mcpu=powerpc64le defaults. */
+ HOST_WIDE_INT flags = ((TARGET_DEFAULT) ? TARGET_DEFAULT
+ : processor_target_table[cpu_index].target_enable);
+ rs6000_isa_flags |= (flags & ~rs6000_isa_flags_explicit);
+ }
if (rs6000_tune_index >= 0)
tune_index = rs6000_tune_index;
@@ -4012,6 +4023,22 @@
}
}
+ /* Determine when unaligned vector accesses are permitted, and when
+ they are preferred over masked Altivec loads. Note that if
+ TARGET_ALLOW_MOVMISALIGN has been disabled by the user, then
+ TARGET_EFFICIENT_UNALIGNED_VSX must be as well. The converse is
+ not true. */
+ if (TARGET_EFFICIENT_UNALIGNED_VSX == -1) {
+ if (TARGET_VSX && rs6000_cpu == PROCESSOR_POWER8
+ && TARGET_ALLOW_MOVMISALIGN != 0)
+ TARGET_EFFICIENT_UNALIGNED_VSX = 1;
+ else
+ TARGET_EFFICIENT_UNALIGNED_VSX = 0;
+ }
+
+ if (TARGET_ALLOW_MOVMISALIGN == -1 && rs6000_cpu == PROCESSOR_POWER8)
+ TARGET_ALLOW_MOVMISALIGN = 1;
+
/* Set the builtin mask of the various options used that could affect which
builtins were used. In the past we used target_flags, but we've run out
of bits, and some options like SPE and PAIRED are no longer in
@@ -4018,12 +4045,8 @@
target_flags. */
rs6000_builtin_mask = rs6000_builtin_mask_calculate ();
if (TARGET_DEBUG_BUILTIN || TARGET_DEBUG_TARGET)
- {
- fprintf (stderr,
- "new builtin mask = " HOST_WIDE_INT_PRINT_HEX ", ",
- rs6000_builtin_mask);
- rs6000_print_builtin_options (stderr, 0, NULL, rs6000_builtin_mask);
- }
+ rs6000_print_builtin_options (stderr, 0, "builtin mask",
+ rs6000_builtin_mask);
/* Initialize all of the registers. */
rs6000_init_hard_regno_mode_ok (global_init_p);
@@ -4041,6 +4064,37 @@
return ret;
}
+static bool
+gate_analyze_swaps (void)
+{
+ return (optimize > 0 && !BYTES_BIG_ENDIAN && TARGET_VSX
+ && rs6000_optimize_swaps);
+}
+
+static unsigned int
+execute_analyze_swaps (void)
+{
+ return rs6000_analyze_swaps (cfun);
+}
+
+struct rtl_opt_pass pass_analyze_swaps =
+{
+ RTL_PASS,
+ "swaps", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
+ gate_analyze_swaps, /* has_gate */
+ execute_analyze_swaps, /* has_execute */
+ NULL, /* sub */
+ NULL, /* next */
+ 0, /* static_pass_number */
+ TV_NONE, /* tv_id */
+ 0, /* properties_required */
+ 0, /* properties_provided */
+ 0, /* properties_destroyed */
+ 0, /* todo_flags_start */
+ TODO_df_finish, /* todo_flags_finish */
+};
+
/* Implement TARGET_OPTION_OVERRIDE. On the RS/6000 this is used to
define the target cpu type. */
@@ -4048,6 +4102,13 @@
rs6000_option_override (void)
{
(void) rs6000_option_override_internal (true);
+
+ /* Register machine-specific passes. This needs to be done at start-up.
+ It's convenient to do it here (like i386 does). */
+ static struct register_pass_info analyze_swaps_info
+ = { &pass_analyze_swaps.pass, "cse1", 1, PASS_POS_INSERT_BEFORE };
+
+ register_pass (&analyze_swaps_info);
}
@@ -4055,7 +4116,9 @@
static tree
rs6000_builtin_mask_for_load (void)
{
- if (TARGET_ALTIVEC || TARGET_VSX)
+ /* Don't use lvsl/vperm for P8 and similarly efficient machines. */
+ if ((TARGET_ALTIVEC && !TARGET_VSX)
+ || (TARGET_VSX && !TARGET_EFFICIENT_UNALIGNED_VSX))
return altivec_builtin_mask_for_load;
else
return 0;
@@ -4134,6 +4197,9 @@
{
if (TARGET_VSX)
{
+ if (TARGET_EFFICIENT_UNALIGNED_VSX)
+ return true;
+
/* Return if movmisalign pattern is not supported for this mode. */
if (optab_handler (movmisalign_optab, mode) == CODE_FOR_nothing)
return false;
@@ -4197,6 +4263,9 @@
return 3;
case unaligned_load:
+ if (TARGET_EFFICIENT_UNALIGNED_VSX)
+ return 1;
+
if (TARGET_VSX && TARGET_ALLOW_MOVMISALIGN)
{
elements = TYPE_VECTOR_SUBPARTS (vectype);
@@ -4232,6 +4301,9 @@
return 2;
case unaligned_store:
+ if (TARGET_EFFICIENT_UNALIGNED_VSX)
+ return 1;
+
if (TARGET_VSX && TARGET_ALLOW_MOVMISALIGN)
{
elements = TYPE_VECTOR_SUBPARTS (vectype);
@@ -4893,6 +4965,28 @@
switch_to_section (toc_section);
switch_to_section (text_section);
}
+
+#ifdef USING_ELFOS_H
+ if (rs6000_default_cpu == 0 || rs6000_default_cpu[0] == '\0'
+ || !global_options_set.x_rs6000_cpu_index)
+ {
+ fputs ("\t.machine ", asm_out_file);
+ if ((rs6000_isa_flags & OPTION_MASK_DIRECT_MOVE) != 0)
+ fputs ("power8\n", asm_out_file);
+ else if ((rs6000_isa_flags & OPTION_MASK_POPCNTD) != 0)
+ fputs ("power7\n", asm_out_file);
+ else if ((rs6000_isa_flags & OPTION_MASK_CMPB) != 0)
+ fputs ("power6\n", asm_out_file);
+ else if ((rs6000_isa_flags & OPTION_MASK_POPCNTB) != 0)
+ fputs ("power5\n", asm_out_file);
+ else if ((rs6000_isa_flags & OPTION_MASK_MFCRF) != 0)
+ fputs ("power4\n", asm_out_file);
+ else if ((rs6000_isa_flags & OPTION_MASK_POWERPC64) != 0)
+ fputs ("ppc64\n", asm_out_file);
+ else
+ fputs ("ppc\n", asm_out_file);
+ }
+#endif
}
@@ -8160,6 +8254,11 @@
{
rtx tmp, permute_src, permute_tmp;
+ /* This should never be called during or after reload, because it does
+ not re-permute the source register. It is intended only for use
+ during expand. */
+ gcc_assert (!reload_in_progress && !lra_in_progress && !reload_completed);
+
/* Use V2DImode to do swaps of types with 128-bit scalare parts (TImode,
V1TImode). */
if (mode == TImode || mode == V1TImode)
@@ -20748,7 +20847,7 @@
them in again. More importantly, the mask we compute here is
used to generate CLOBBERs in the set_vrsave insn, and we do not
wish the argument registers to die. */
- for (i = crtl->args.info.vregno - 1; i >= ALTIVEC_ARG_MIN_REG; --i)
+ for (i = ALTIVEC_ARG_MIN_REG; i < (unsigned) crtl->args.info.vregno; i++)
mask &= ~ALTIVEC_REG_BIT (i);
/* Similarly, remove the return value from the set. */
@@ -21158,6 +21257,9 @@
static rs6000_stack_t *
rs6000_stack_info (void)
{
+ /* We should never be called for thunks, we are not set up for that. */
+ gcc_assert (!cfun->is_thunk);
+
rs6000_stack_t *info_ptr = &stack_info;
int reg_size = TARGET_32BIT ? 4 : 8;
int ehrd_size;
@@ -22330,7 +22432,7 @@
static rtx
rs6000_frame_related (rtx insn, rtx reg, HOST_WIDE_INT val,
- rtx reg2, rtx rreg, rtx split_reg)
+ rtx reg2, rtx rreg)
{
rtx real, temp;
@@ -22421,11 +22523,6 @@
}
}
- /* If a store insn has been split into multiple insns, the
- true source register is given by split_reg. */
- if (split_reg != NULL_RTX)
- real = gen_rtx_SET (VOIDmode, SET_DEST (real), split_reg);
-
RTX_FRAME_RELATED_P (insn) = 1;
add_reg_note (insn, REG_FRAME_RELATED_EXPR, real);
@@ -22533,7 +22630,7 @@
reg = gen_rtx_REG (mode, regno);
insn = emit_insn (gen_frame_store (reg, frame_reg, offset));
return rs6000_frame_related (insn, frame_reg, frame_reg_to_sp,
- NULL_RTX, NULL_RTX, NULL_RTX);
+ NULL_RTX, NULL_RTX);
}
/* Emit an offset memory reference suitable for a frame store, while
@@ -23102,7 +23199,7 @@
insn = emit_insn (gen_rtx_PARALLEL (VOIDmode, p));
rs6000_frame_related (insn, frame_reg_rtx, sp_off - frame_off,
- treg, GEN_INT (-info->total_size), NULL_RTX);
+ treg, GEN_INT (-info->total_size));
sp_off = frame_off = info->total_size;
}
@@ -23187,7 +23284,7 @@
insn = emit_move_insn (mem, reg);
rs6000_frame_related (insn, frame_reg_rtx, sp_off - frame_off,
- NULL_RTX, NULL_RTX, NULL_RTX);
+ NULL_RTX, NULL_RTX);
END_USE (0);
}
}
@@ -23243,7 +23340,7 @@
info->lr_save_offset,
DFmode, sel);
rs6000_frame_related (insn, ptr_reg, sp_off,
- NULL_RTX, NULL_RTX, NULL_RTX);
+ NULL_RTX, NULL_RTX);
if (lr)
END_USE (0);
}
@@ -23322,7 +23419,7 @@
SAVRES_SAVE | SAVRES_GPR);
rs6000_frame_related (insn, spe_save_area_ptr, sp_off - save_off,
- NULL_RTX, NULL_RTX, NULL_RTX);
+ NULL_RTX, NULL_RTX);
}
/* Move the static chain pointer back. */
@@ -23372,7 +23469,7 @@
info->lr_save_offset + ptr_off,
reg_mode, sel);
rs6000_frame_related (insn, ptr_reg, sp_off - ptr_off,
- NULL_RTX, NULL_RTX, NULL_RTX);
+ NULL_RTX, NULL_RTX);
if (lr)
END_USE (0);
}
@@ -23388,7 +23485,7 @@
info->gp_save_offset + frame_off + reg_size * i);
insn = emit_insn (gen_rtx_PARALLEL (VOIDmode, p));
rs6000_frame_related (insn, frame_reg_rtx, sp_off - frame_off,
- NULL_RTX, NULL_RTX, NULL_RTX);
+ NULL_RTX, NULL_RTX);
}
else if (!WORLD_SAVE_P (info))
{
@@ -23711,7 +23808,7 @@
info->altivec_save_offset + ptr_off,
0, V4SImode, SAVRES_SAVE | SAVRES_VR);
rs6000_frame_related (insn, scratch_reg, sp_off - ptr_off,
- NULL_RTX, NULL_RTX, NULL_RTX);
+ NULL_RTX, NULL_RTX);
if (REGNO (frame_reg_rtx) == REGNO (scratch_reg))
{
/* The oddity mentioned above clobbered our frame reg. */
@@ -23727,7 +23824,7 @@
for (i = info->first_altivec_reg_save; i <= LAST_ALTIVEC_REGNO; ++i)
if (info->vrsave_mask & ALTIVEC_REG_BIT (i))
{
- rtx areg, savereg, mem, split_reg;
+ rtx areg, savereg, mem;
int offset;
offset = (info->altivec_save_offset + frame_off
@@ -23743,20 +23840,13 @@
mem = gen_frame_mem (V4SImode,
gen_rtx_PLUS (Pmode, frame_reg_rtx, areg));
- insn = emit_move_insn (mem, savereg);
+ /* Rather than emitting a generic move, force use of the stvx
+ instruction, which we always want. In particular we don't
+ want xxpermdi/stxvd2x for little endian. */
+ insn = emit_insn (gen_altivec_stvx_v4si_internal (mem, savereg));
- /* When we split a VSX store into two insns, we need to make
- sure the DWARF info knows which register we are storing.
- Pass it in to be used on the appropriate note. */
- if (!BYTES_BIG_ENDIAN
- && GET_CODE (PATTERN (insn)) == SET
- && GET_CODE (SET_SRC (PATTERN (insn))) == VEC_SELECT)
- split_reg = savereg;
- else
- split_reg = NULL_RTX;
-
rs6000_frame_related (insn, frame_reg_rtx, sp_off - frame_off,
- areg, GEN_INT (offset), split_reg);
+ areg, GEN_INT (offset));
}
}
@@ -23886,11 +23976,10 @@
}
}
-/* Write function prologue. */
+/* Output .extern statements for the save/restore routines we use. */
static void
-rs6000_output_function_prologue (FILE *file,
- HOST_WIDE_INT size ATTRIBUTE_UNUSED)
+rs6000_output_savres_externs (FILE *file)
{
rs6000_stack_t *info = rs6000_stack_info ();
@@ -23922,7 +24011,17 @@
fprintf (file, "\t.extern %s\n", name);
}
}
+}
+/* Write function prologue. */
+
+static void
+rs6000_output_function_prologue (FILE *file,
+ HOST_WIDE_INT size ATTRIBUTE_UNUSED)
+{
+ if (!cfun->is_thunk)
+ rs6000_output_savres_externs (file);
+
/* ELFv2 ABI r2 setup code and local entry point. This must follow
immediately after the global entry point label. */
if (DEFAULT_ABI == ABI_ELFv2 && cfun->machine->r2_setup_needed)
@@ -24389,7 +24488,10 @@
mem = gen_frame_mem (V4SImode, addr);
reg = gen_rtx_REG (V4SImode, i);
- emit_move_insn (reg, mem);
+ /* Rather than emitting a generic move, force use of the
+ lvx instruction, which we always want. In particular
+ we don't want lxvd2x/xxpermdi for little endian. */
+ (void) emit_insn (gen_altivec_lvx_v4si_internal (reg, mem));
}
}
@@ -24587,7 +24689,10 @@
mem = gen_frame_mem (V4SImode, addr);
reg = gen_rtx_REG (V4SImode, i);
- emit_move_insn (reg, mem);
+ /* Rather than emitting a generic move, force use of the
+ lvx instruction, which we always want. In particular
+ we don't want lxvd2x/xxpermdi for little endian. */
+ (void) emit_insn (gen_altivec_lvx_v4si_internal (reg, mem));
}
}
@@ -31531,10 +31636,11 @@
{ "quad-memory", OPTION_MASK_QUAD_MEMORY, false, true },
{ "quad-memory-atomic", OPTION_MASK_QUAD_MEMORY_ATOMIC, false, true },
{ "recip-precision", OPTION_MASK_RECIP_PRECISION, false, true },
+ { "save-toc-indirect", OPTION_MASK_SAVE_TOC_INDIRECT, false, true },
{ "string", OPTION_MASK_STRING, false, true },
{ "update", OPTION_MASK_NO_UPDATE, true , true },
- { "upper-regs-df", OPTION_MASK_UPPER_REGS_DF, false, false },
- { "upper-regs-sf", OPTION_MASK_UPPER_REGS_SF, false, false },
+ { "upper-regs-df", OPTION_MASK_UPPER_REGS_DF, false, true },
+ { "upper-regs-sf", OPTION_MASK_UPPER_REGS_SF, false, true },
{ "vsx", OPTION_MASK_VSX, false, true },
{ "vsx-timode", OPTION_MASK_VSX_TIMODE, false, true },
#ifdef OPTION_MASK_64BIT
@@ -31607,6 +31713,42 @@
{ "longcall",
offsetof (struct gcc_options, x_rs6000_default_long_calls),
offsetof (struct cl_target_option, x_rs6000_default_long_calls), },
+ { "optimize-swaps",
+ offsetof (struct gcc_options, x_rs6000_optimize_swaps),
+ offsetof (struct cl_target_option, x_rs6000_optimize_swaps), },
+ { "allow-movmisalign",
+ offsetof (struct gcc_options, x_TARGET_ALLOW_MOVMISALIGN),
+ offsetof (struct cl_target_option, x_TARGET_ALLOW_MOVMISALIGN), },
+ { "allow-df-permute",
+ offsetof (struct gcc_options, x_TARGET_ALLOW_DF_PERMUTE),
+ offsetof (struct cl_target_option, x_TARGET_ALLOW_DF_PERMUTE), },
+ { "sched-groups",
+ offsetof (struct gcc_options, x_TARGET_SCHED_GROUPS),
+ offsetof (struct cl_target_option, x_TARGET_SCHED_GROUPS), },
+ { "always-hint",
+ offsetof (struct gcc_options, x_TARGET_ALWAYS_HINT),
+ offsetof (struct cl_target_option, x_TARGET_ALWAYS_HINT), },
+ { "align-branch-targets",
+ offsetof (struct gcc_options, x_TARGET_ALIGN_BRANCH_TARGETS),
+ offsetof (struct cl_target_option, x_TARGET_ALIGN_BRANCH_TARGETS), },
+ { "vectorize-builtins",
+ offsetof (struct gcc_options, x_TARGET_VECTORIZE_BUILTINS),
+ offsetof (struct cl_target_option, x_TARGET_VECTORIZE_BUILTINS), },
+ { "tls-markers",
+ offsetof (struct gcc_options, x_tls_markers),
+ offsetof (struct cl_target_option, x_tls_markers), },
+ { "sched-prolog",
+ offsetof (struct gcc_options, x_TARGET_SCHED_PROLOG),
+ offsetof (struct cl_target_option, x_TARGET_SCHED_PROLOG), },
+ { "sched-epilog",
+ offsetof (struct gcc_options, x_TARGET_SCHED_PROLOG),
+ offsetof (struct cl_target_option, x_TARGET_SCHED_PROLOG), },
+ { "gen-cell-microcode",
+ offsetof (struct gcc_options, x_rs6000_gen_cell_microcode),
+ offsetof (struct cl_target_option, x_rs6000_gen_cell_microcode), },
+ { "warn-cell-microcode",
+ offsetof (struct gcc_options, x_rs6000_warn_cell_microcode),
+ offsetof (struct cl_target_option, x_rs6000_warn_cell_microcode), },
};
/* Inner function to handle attribute((target("..."))) and #pragma GCC target
@@ -31680,9 +31822,15 @@
rs6000_isa_flags_explicit |= mask;
/* VSX needs altivec, so -mvsx automagically sets
- altivec. */
- if (mask == OPTION_MASK_VSX && !invert)
- mask |= OPTION_MASK_ALTIVEC;
+ altivec and disables -mavoid-indexed-addresses. */
+ if (!invert)
+ {
+ if (mask == OPTION_MASK_VSX)
+ {
+ mask |= OPTION_MASK_ALTIVEC;
+ TARGET_AVOID_XFORM = 0;
+ }
+ }
if (rs6000_opt_masks[i].invert)
invert = !invert;
@@ -31703,6 +31851,7 @@
size_t j = rs6000_opt_vars[i].global_offset;
*((int *) ((char *)&global_options + j)) = !invert;
error_p = false;
+ not_valid_p = false;
break;
}
}
@@ -32628,6 +32777,14 @@
if (complement_op2_p)
op2 = gen_rtx_NOT (mode, op2);
+ /* For canonical RTL, if only one arm is inverted it is the first. */
+ if (!complement_op1_p && complement_op2_p)
+ {
+ rtx temp = op1;
+ op1 = op2;
+ op2 = temp;
+ }
+
bool_rtx = ((code == NOT)
? gen_rtx_NOT (mode, op1)
: gen_rtx_fmt_ee (code, mode, op1, op2));
@@ -33163,7 +33320,1178 @@
return "";
}
+
+/* Analyze vector computations and remove unnecessary doubleword
+ swaps (xxswapdi instructions). This pass is performed only
+ for little-endian VSX code generation.
+ For this specific case, loads and stores of 4x32 and 2x64 vectors
+ are inefficient. These are implemented using the lvx2dx and
+ stvx2dx instructions, which invert the order of doublewords in
+ a vector register. Thus the code generation inserts an xxswapdi
+ after each such load, and prior to each such store. (For spill
+ code after register assignment, an additional xxswapdi is inserted
+ following each store in order to return a hard register to its
+ unpermuted value.)
+
+ The extra xxswapdi instructions reduce performance. This can be
+ particularly bad for vectorized code. The purpose of this pass
+ is to reduce the number of xxswapdi instructions required for
+ correctness.
+
+ The primary insight is that much code that operates on vectors
+ does not care about the relative order of elements in a register,
+ so long as the correct memory order is preserved. If we have
+ a computation where all input values are provided by lvxd2x/xxswapdi
+ sequences, all outputs are stored using xxswapdi/stvxd2x sequences,
+ and all intermediate computations are pure SIMD (independent of
+ element order), then all the xxswapdi's associated with the loads
+ and stores may be removed.
+
+ This pass uses some of the infrastructure and logical ideas from
+ the "web" pass in web.c. We create maximal webs of computations
+ fitting the description above using union-find. Each such web is
+ then optimized by removing its unnecessary xxswapdi instructions.
+
+ The pass is placed prior to global optimization so that we can
+ perform the optimization in the safest and simplest way possible;
+ that is, by replacing each xxswapdi insn with a register copy insn.
+ Subsequent forward propagation will remove copies where possible.
+
+ There are some operations sensitive to element order for which we
+ can still allow the operation, provided we modify those operations.
+ These include CONST_VECTORs, for which we must swap the first and
+ second halves of the constant vector; and SUBREGs, for which we
+ must adjust the byte offset to account for the swapped doublewords.
+ A remaining opportunity would be non-immediate-form splats, for
+ which we should adjust the selected lane of the input. We should
+ also make code generation adjustments for sum-across operations,
+ since this is a common vectorizer reduction.
+
+ Because we run prior to the first split, we can see loads and stores
+ here that match *vsx_le_perm_{load,store}_<mode>. These are vanilla
+ vector loads and stores that have not yet been split into a permuting
+ load/store and a swap. (One way this can happen is with a builtin
+ call to vec_vsx_{ld,st}.) We can handle these as well, but rather
+ than deleting a swap, we convert the load/store into a permuting
+ load/store (which effectively removes the swap). */
+
+/* Notes on Permutes
+
+ We do not currently handle computations that contain permutes. There
+ is a general transformation that can be performed correctly, but it
+ may introduce more expensive code than it replaces. To handle these
+ would require a cost model to determine when to perform the optimization.
+ This commentary records how this could be done if desired.
+
+ The most general permute is something like this (example for V16QI):
+
+ (vec_select:V16QI (vec_concat:V32QI (op1:V16QI) (op2:V16QI))
+ (parallel [(const_int a0) (const_int a1)
+ ...
+ (const_int a14) (const_int a15)]))
+
+ where a0,...,a15 are in [0,31] and select elements from op1 and op2
+ to produce in the result.
+
+ Regardless of mode, we can convert the PARALLEL to a mask of 16
+ byte-element selectors. Let's call this M, with M[i] representing
+ the ith byte-element selector value. Then if we swap doublewords
+ throughout the computation, we can get correct behavior by replacing
+ M with M' as follows:
+
+ { M[i+8]+8 : i < 8, M[i+8] in [0,7] U [16,23]
+ M'[i] = { M[i+8]-8 : i < 8, M[i+8] in [8,15] U [24,31]
+ { M[i-8]+8 : i >= 8, M[i-8] in [0,7] U [16,23]
+ { M[i-8]-8 : i >= 8, M[i-8] in [8,15] U [24,31]
+
+ This seems promising at first, since we are just replacing one mask
+ with another. But certain masks are preferable to others. If M
+ is a mask that matches a vmrghh pattern, for example, M' certainly
+ will not. Instead of a single vmrghh, we would generate a load of
+ M' and a vperm. So we would need to know how many xxswapd's we can
+ remove as a result of this transformation to determine if it's
+ profitable; and preferably the logic would need to be aware of all
+ the special preferable masks.
+
+ Another form of permute is an UNSPEC_VPERM, in which the mask is
+ already in a register. In some cases, this mask may be a constant
+ that we can discover with ud-chains, in which case the above
+ transformation is ok. However, the common usage here is for the
+ mask to be produced by an UNSPEC_LVSL, in which case the mask
+ cannot be known at compile time. In such a case we would have to
+ generate several instructions to compute M' as above at run time,
+ and a cost model is needed again. */
+
+/* This is based on the union-find logic in web.c. web_entry_base is
+ defined in df.h. */
+class swap_web_entry : public web_entry_base
+{
+ public:
+ /* Pointer to the insn. */
+ rtx insn;
+ /* Set if insn contains a mention of a vector register. All other
+ fields are undefined if this field is unset. */
+ unsigned int is_relevant : 1;
+ /* Set if insn is a load. */
+ unsigned int is_load : 1;
+ /* Set if insn is a store. */
+ unsigned int is_store : 1;
+ /* Set if insn is a doubleword swap. This can either be a register swap
+ or a permuting load or store (test is_load and is_store for this). */
+ unsigned int is_swap : 1;
+ /* Set if the insn has a live-in use of a parameter register. */
+ unsigned int is_live_in : 1;
+ /* Set if the insn has a live-out def of a return register. */
+ unsigned int is_live_out : 1;
+ /* Set if the insn contains a subreg reference of a vector register. */
+ unsigned int contains_subreg : 1;
+ /* Set if the insn contains a 128-bit integer operand. */
+ unsigned int is_128_int : 1;
+ /* Set if this is a call-insn. */
+ unsigned int is_call : 1;
+ /* Set if this insn does not perform a vector operation for which
+ element order matters, or if we know how to fix it up if it does.
+ Undefined if is_swap is set. */
+ unsigned int is_swappable : 1;
+ /* A nonzero value indicates what kind of special handling for this
+ insn is required if doublewords are swapped. Undefined if
+ is_swappable is not set. */
+ unsigned int special_handling : 3;
+ /* Set if the web represented by this entry cannot be optimized. */
+ unsigned int web_not_optimizable : 1;
+ /* Set if this insn should be deleted. */
+ unsigned int will_delete : 1;
+};
+
+enum special_handling_values {
+ SH_NONE = 0,
+ SH_CONST_VECTOR,
+ SH_SUBREG,
+ SH_NOSWAP_LD,
+ SH_NOSWAP_ST,
+ SH_EXTRACT,
+ SH_SPLAT
+};
+
+/* Union INSN with all insns containing definitions that reach USE.
+ Detect whether USE is live-in to the current function. */
+static void
+union_defs (swap_web_entry *insn_entry, rtx insn, df_ref use)
+{
+ struct df_link *link = DF_REF_CHAIN (use);
+
+ if (!link)
+ insn_entry[INSN_UID (insn)].is_live_in = 1;
+
+ while (link)
+ {
+ if (DF_REF_IS_ARTIFICIAL (link->ref))
+ insn_entry[INSN_UID (insn)].is_live_in = 1;
+
+ if (DF_REF_INSN_INFO (link->ref))
+ {
+ rtx def_insn = DF_REF_INSN (link->ref);
+ (void)unionfind_union (insn_entry + INSN_UID (insn),
+ insn_entry + INSN_UID (def_insn));
+ }
+
+ link = link->next;
+ }
+}
+
+/* Union INSN with all insns containing uses reached from DEF.
+ Detect whether DEF is live-out from the current function. */
+static void
+union_uses (swap_web_entry *insn_entry, rtx insn, df_ref def)
+{
+ struct df_link *link = DF_REF_CHAIN (def);
+
+ if (!link)
+ insn_entry[INSN_UID (insn)].is_live_out = 1;
+
+ while (link)
+ {
+ /* This could be an eh use or some other artificial use;
+ we treat these all the same (killing the optimization). */
+ if (DF_REF_IS_ARTIFICIAL (link->ref))
+ insn_entry[INSN_UID (insn)].is_live_out = 1;
+
+ if (DF_REF_INSN_INFO (link->ref))
+ {
+ rtx use_insn = DF_REF_INSN (link->ref);
+ (void)unionfind_union (insn_entry + INSN_UID (insn),
+ insn_entry + INSN_UID (use_insn));
+ }
+
+ link = link->next;
+ }
+}
+
+/* Return 1 iff INSN is a load insn, including permuting loads that
+ represent an lvxd2x instruction; else return 0. */
+static unsigned int
+insn_is_load_p (rtx insn)
+{
+ rtx body = PATTERN (insn);
+
+ if (GET_CODE (body) == SET)
+ {
+ if (GET_CODE (SET_SRC (body)) == MEM)
+ return 1;
+
+ if (GET_CODE (SET_SRC (body)) == VEC_SELECT
+ && GET_CODE (XEXP (SET_SRC (body), 0)) == MEM)
+ return 1;
+
+ return 0;
+ }
+
+ if (GET_CODE (body) != PARALLEL)
+ return 0;
+
+ rtx set = XVECEXP (body, 0, 0);
+
+ if (GET_CODE (set) == SET && GET_CODE (SET_SRC (set)) == MEM)
+ return 1;
+
+ return 0;
+}
+
+/* Return 1 iff INSN is a store insn, including permuting stores that
+ represent an stvxd2x instruction; else return 0. */
+static unsigned int
+insn_is_store_p (rtx insn)
+{
+ rtx body = PATTERN (insn);
+ if (GET_CODE (body) == SET && GET_CODE (SET_DEST (body)) == MEM)
+ return 1;
+ if (GET_CODE (body) != PARALLEL)
+ return 0;
+ rtx set = XVECEXP (body, 0, 0);
+ if (GET_CODE (set) == SET && GET_CODE (SET_DEST (set)) == MEM)
+ return 1;
+ return 0;
+}
+
+/* Return 1 iff INSN swaps doublewords. This may be a reg-reg swap,
+ a permuting load, or a permuting store. */
+static unsigned int
+insn_is_swap_p (rtx insn)
+{
+ rtx body = PATTERN (insn);
+ if (GET_CODE (body) != SET)
+ return 0;
+ rtx rhs = SET_SRC (body);
+ if (GET_CODE (rhs) != VEC_SELECT)
+ return 0;
+ rtx parallel = XEXP (rhs, 1);
+ if (GET_CODE (parallel) != PARALLEL)
+ return 0;
+ unsigned int len = XVECLEN (parallel, 0);
+ if (len != 2 && len != 4 && len != 8 && len != 16)
+ return 0;
+ for (unsigned int i = 0; i < len / 2; ++i)
+ {
+ rtx op = XVECEXP (parallel, 0, i);
+ if (GET_CODE (op) != CONST_INT || INTVAL (op) != len / 2 + i)
+ return 0;
+ }
+ for (unsigned int i = len / 2; i < len; ++i)
+ {
+ rtx op = XVECEXP (parallel, 0, i);
+ if (GET_CODE (op) != CONST_INT || INTVAL (op) != i - len / 2)
+ return 0;
+ }
+ return 1;
+}
+
+/* Return 1 iff OP is an operand that will not be affected by having
+ vector doublewords swapped in memory. */
+static unsigned int
+rtx_is_swappable_p (rtx op, unsigned int *special)
+{
+ enum rtx_code code = GET_CODE (op);
+ int i, j;
+ rtx parallel;
+
+ switch (code)
+ {
+ case LABEL_REF:
+ case SYMBOL_REF:
+ case CLOBBER:
+ case REG:
+ return 1;
+
+ case VEC_CONCAT:
+ case ASM_INPUT:
+ case ASM_OPERANDS:
+ return 0;
+
+ case CONST_VECTOR:
+ {
+ *special = SH_CONST_VECTOR;
+ return 1;
+ }
+
+ case VEC_DUPLICATE:
+ /* Opportunity: If XEXP (op, 0) has the same mode as the result,
+ and XEXP (op, 1) is a PARALLEL with a single QImode const int,
+ it represents a vector splat for which we can do special
+ handling. */
+ if (GET_CODE (XEXP (op, 0)) == CONST_INT)
+ return 1;
+ else if (GET_CODE (XEXP (op, 0)) == REG
+ && GET_MODE_INNER (GET_MODE (op)) == GET_MODE (XEXP (op, 0)))
+ /* This catches V2DF and V2DI splat, at a minimum. */
+ return 1;
+ else if (GET_CODE (XEXP (op, 0)) == VEC_SELECT)
+ /* If the duplicated item is from a select, defer to the select
+ processing to see if we can change the lane for the splat. */
+ return rtx_is_swappable_p (XEXP (op, 0), special);
+ else
+ return 0;
+
+ case VEC_SELECT:
+ /* A vec_extract operation is ok if we change the lane. */
+ if (GET_CODE (XEXP (op, 0)) == REG
+ && GET_MODE_INNER (GET_MODE (XEXP (op, 0))) == GET_MODE (op)
+ && GET_CODE ((parallel = XEXP (op, 1))) == PARALLEL
+ && XVECLEN (parallel, 0) == 1
+ && GET_CODE (XVECEXP (parallel, 0, 0)) == CONST_INT)
+ {
+ *special = SH_EXTRACT;
+ return 1;
+ }
+ else
+ return 0;
+
+ case UNSPEC:
+ {
+ /* Various operations are unsafe for this optimization, at least
+ without significant additional work. Permutes are obviously
+ problematic, as both the permute control vector and the ordering
+ of the target values are invalidated by doubleword swapping.
+ Vector pack and unpack modify the number of vector lanes.
+ Merge-high/low will not operate correctly on swapped operands.
+ Vector shifts across element boundaries are clearly uncool,
+ as are vector select and concatenate operations. Vector
+ sum-across instructions define one operand with a specific
+ order-dependent element, so additional fixup code would be
+ needed to make those work. Vector set and non-immediate-form
+ vector splat are element-order sensitive. A few of these
+ cases might be workable with special handling if required.
+ Adding cost modeling would be appropriate in some cases. */
+ int val = XINT (op, 1);
+ switch (val)
+ {
+ default:
+ break;
+ case UNSPEC_VMRGH_DIRECT:
+ case UNSPEC_VMRGL_DIRECT:
+ case UNSPEC_VPACK_SIGN_SIGN_SAT:
+ case UNSPEC_VPACK_SIGN_UNS_SAT:
+ case UNSPEC_VPACK_UNS_UNS_MOD:
+ case UNSPEC_VPACK_UNS_UNS_MOD_DIRECT:
+ case UNSPEC_VPACK_UNS_UNS_SAT:
+ case UNSPEC_VPERM:
+ case UNSPEC_VPERM_UNS:
+ case UNSPEC_VPERMHI:
+ case UNSPEC_VPERMSI:
+ case UNSPEC_VPKPX:
+ case UNSPEC_VSLDOI:
+ case UNSPEC_VSLO:
+ case UNSPEC_VSRO:
+ case UNSPEC_VSUM2SWS:
+ case UNSPEC_VSUM4S:
+ case UNSPEC_VSUM4UBS:
+ case UNSPEC_VSUMSWS:
+ case UNSPEC_VSUMSWS_DIRECT:
+ case UNSPEC_VSX_CONCAT:
+ case UNSPEC_VSX_SET:
+ case UNSPEC_VSX_SLDWI:
+ case UNSPEC_VUNPACK_HI_SIGN:
+ case UNSPEC_VUNPACK_HI_SIGN_DIRECT:
+ case UNSPEC_VUNPACK_LO_SIGN:
+ case UNSPEC_VUNPACK_LO_SIGN_DIRECT:
+ case UNSPEC_VUPKHPX:
+ case UNSPEC_VUPKHS_V4SF:
+ case UNSPEC_VUPKHU_V4SF:
+ case UNSPEC_VUPKLPX:
+ case UNSPEC_VUPKLS_V4SF:
+ case UNSPEC_VUPKLU_V4SF:
+ case UNSPEC_VSX_CVDPSPN:
+ case UNSPEC_VSX_CVSPDP:
+ case UNSPEC_VSX_CVSPDPN:
+ return 0;
+ case UNSPEC_VSPLT_DIRECT:
+ *special = SH_SPLAT;
+ return 1;
+ }
+ }
+
+ default:
+ break;
+ }
+
+ const char *fmt = GET_RTX_FORMAT (code);
+ int ok = 1;
+
+ for (i = 0; i < GET_RTX_LENGTH (code); ++i)
+ if (fmt[i] == 'e' || fmt[i] == 'u')
+ {
+ unsigned int special_op = SH_NONE;
+ ok &= rtx_is_swappable_p (XEXP (op, i), &special_op);
+ if (special_op == SH_NONE)
+ continue;
+ /* Ensure we never have two kinds of special handling
+ for the same insn. */
+ if (*special != SH_NONE && *special != special_op)
+ return 0;
+ *special = special_op;
+ }
+ else if (fmt[i] == 'E')
+ for (j = 0; j < XVECLEN (op, i); ++j)
+ {
+ unsigned int special_op = SH_NONE;
+ ok &= rtx_is_swappable_p (XVECEXP (op, i, j), &special_op);
+ if (special_op == SH_NONE)
+ continue;
+ /* Ensure we never have two kinds of special handling
+ for the same insn. */
+ if (*special != SH_NONE && *special != special_op)
+ return 0;
+ *special = special_op;
+ }
+
+ return ok;
+}
+
+/* Return 1 iff INSN is an operand that will not be affected by
+ having vector doublewords swapped in memory (in which case
+ *SPECIAL is unchanged), or that can be modified to be correct
+ if vector doublewords are swapped in memory (in which case
+ *SPECIAL is changed to a value indicating how). */
+static unsigned int
+insn_is_swappable_p (swap_web_entry *insn_entry, rtx insn,
+ unsigned int *special)
+{
+ /* Calls are always bad. */
+ if (GET_CODE (insn) == CALL_INSN)
+ return 0;
+
+ /* Loads and stores seen here are not permuting, but we can still
+ fix them up by converting them to permuting ones. Exceptions:
+ UNSPEC_LVE, UNSPEC_LVX, and UNSPEC_STVX, which have a PARALLEL
+ body instead of a SET; and UNSPEC_STVE, which has an UNSPEC
+ for the SET source. */
+ rtx body = PATTERN (insn);
+ int i = INSN_UID (insn);
+
+ if (insn_entry[i].is_load)
+ {
+ if (GET_CODE (body) == SET)
+ {
+ *special = SH_NOSWAP_LD;
+ return 1;
+ }
+ else
+ return 0;
+ }
+
+ if (insn_entry[i].is_store)
+ {
+ if (GET_CODE (body) == SET && GET_CODE (SET_SRC (body)) != UNSPEC)
+ {
+ *special = SH_NOSWAP_ST;
+ return 1;
+ }
+ else
+ return 0;
+ }
+
+ /* A convert to single precision can be left as is provided that
+ all of its uses are in xxspltw instructions that splat BE element
+ zero. */
+ if (GET_CODE (body) == SET
+ && GET_CODE (SET_SRC (body)) == UNSPEC
+ && XINT (SET_SRC (body), 1) == UNSPEC_VSX_CVDPSPN)
+ {
+ df_ref *def_rec;
+
+ for (def_rec = DF_INSN_UID_DEFS (i); *def_rec; def_rec++)
+ {
+ df_ref def = *def_rec;
+ struct df_link *link = DF_REF_CHAIN (def);
+ if (!link)
+ return 0;
+
+ for (; link; link = link->next) {
+ rtx use_insn = DF_REF_INSN (link->ref);
+ rtx use_body = PATTERN (use_insn);
+ if (GET_CODE (use_body) != SET
+ || GET_CODE (SET_SRC (use_body)) != UNSPEC
+ || XINT (SET_SRC (use_body), 1) != UNSPEC_VSX_XXSPLTW
+ || XEXP (XEXP (SET_SRC (use_body), 0), 1) != const0_rtx)
+ return 0;
+ }
+ }
+
+ return 1;
+ }
+
+ /* Otherwise check the operands for vector lane violations. */
+ return rtx_is_swappable_p (body, special);
+}
+
+enum chain_purpose { FOR_LOADS, FOR_STORES };
+
+/* Return true if the UD or DU chain headed by LINK is non-empty,
+ and every entry on the chain references an insn that is a
+ register swap. Furthermore, if PURPOSE is FOR_LOADS, each such
+ register swap must have only permuting loads as reaching defs.
+ If PURPOSE is FOR_STORES, each such register swap must have only
+ register swaps or permuting stores as reached uses. */
+static bool
+chain_contains_only_swaps (swap_web_entry *insn_entry, struct df_link *link,
+ enum chain_purpose purpose)
+{
+ if (!link)
+ return false;
+
+ for (; link; link = link->next)
+ {
+ if (!VECTOR_MODE_P (GET_MODE (DF_REF_REG (link->ref))))
+ continue;
+
+ if (DF_REF_IS_ARTIFICIAL (link->ref))
+ return false;
+
+ rtx reached_insn = DF_REF_INSN (link->ref);
+ unsigned uid = INSN_UID (reached_insn);
+
+ if (!insn_entry[uid].is_swap || insn_entry[uid].is_load
+ || insn_entry[uid].is_store)
+ return false;
+
+ if (purpose == FOR_LOADS)
+ {
+ df_ref *use_rec;
+ for (use_rec = DF_INSN_UID_USES (uid); *use_rec; use_rec++)
+ {
+ df_ref use = *use_rec;
+ struct df_link *swap_link = DF_REF_CHAIN (use);
+
+ while (swap_link)
+ {
+ if (DF_REF_IS_ARTIFICIAL (link->ref))
+ return false;
+
+ rtx swap_def_insn = DF_REF_INSN (swap_link->ref);
+ unsigned uid2 = INSN_UID (swap_def_insn);
+
+ /* Only permuting loads are allowed. */
+ if (!insn_entry[uid2].is_swap || !insn_entry[uid2].is_load)
+ return false;
+
+ swap_link = swap_link->next;
+ }
+ }
+ }
+ else if (purpose == FOR_STORES)
+ {
+ df_ref *def_rec;
+ for (def_rec = DF_INSN_UID_DEFS (uid); *def_rec; def_rec++)
+ {
+ df_ref def = *def_rec;
+ struct df_link *swap_link = DF_REF_CHAIN (def);
+
+ while (swap_link)
+ {
+ if (DF_REF_IS_ARTIFICIAL (link->ref))
+ return false;
+
+ rtx swap_use_insn = DF_REF_INSN (swap_link->ref);
+ unsigned uid2 = INSN_UID (swap_use_insn);
+
+ /* Permuting stores or register swaps are allowed. */
+ if (!insn_entry[uid2].is_swap || insn_entry[uid2].is_load)
+ return false;
+
+ swap_link = swap_link->next;
+ }
+ }
+ }
+ }
+
+ return true;
+}
+
+/* Mark the xxswapdi instructions associated with permuting loads and
+ stores for removal. Note that we only flag them for deletion here,
+ as there is a possibility of a swap being reached from multiple
+ loads, etc. */
+static void
+mark_swaps_for_removal (swap_web_entry *insn_entry, unsigned int i)
+{
+ rtx insn = insn_entry[i].insn;
+ unsigned uid = INSN_UID (insn);
+
+ if (insn_entry[i].is_load)
+ {
+ df_ref *def_rec;
+ for (def_rec = DF_INSN_UID_DEFS (uid); *def_rec; def_rec++)
+ {
+ df_ref def = *def_rec;
+ struct df_link *link = DF_REF_CHAIN (def);
+
+ /* We know by now that these are swaps, so we can delete
+ them confidently. */
+ while (link)
+ {
+ rtx use_insn = DF_REF_INSN (link->ref);
+ insn_entry[INSN_UID (use_insn)].will_delete = 1;
+ link = link->next;
+ }
+ }
+ }
+ else if (insn_entry[i].is_store)
+ {
+ df_ref *use_rec;
+ for (use_rec = DF_INSN_UID_USES (uid); *use_rec; use_rec++)
+ {
+ df_ref use = *use_rec;
+ /* Ignore uses for addressability. */
+ machine_mode mode = GET_MODE (DF_REF_REG (use));
+ if (!VECTOR_MODE_P (mode))
+ continue;
+
+ struct df_link *link = DF_REF_CHAIN (use);
+
+ /* We know by now that these are swaps, so we can delete
+ them confidently. */
+ while (link)
+ {
+ rtx def_insn = DF_REF_INSN (link->ref);
+ insn_entry[INSN_UID (def_insn)].will_delete = 1;
+ link = link->next;
+ }
+ }
+ }
+}
+
+/* OP is either a CONST_VECTOR or an expression containing one.
+ Swap the first half of the vector with the second in the first
+ case. Recurse to find it in the second. */
+static void
+swap_const_vector_halves (rtx op)
+{
+ int i;
+ enum rtx_code code = GET_CODE (op);
+ if (GET_CODE (op) == CONST_VECTOR)
+ {
+ int half_units = GET_MODE_NUNITS (GET_MODE (op)) / 2;
+ for (i = 0; i < half_units; ++i)
+ {
+ rtx temp = CONST_VECTOR_ELT (op, i);
+ CONST_VECTOR_ELT (op, i) = CONST_VECTOR_ELT (op, i + half_units);
+ CONST_VECTOR_ELT (op, i + half_units) = temp;
+ }
+ }
+ else
+ {
+ int j;
+ const char *fmt = GET_RTX_FORMAT (code);
+ for (i = 0; i < GET_RTX_LENGTH (code); ++i)
+ if (fmt[i] == 'e' || fmt[i] == 'u')
+ swap_const_vector_halves (XEXP (op, i));
+ else if (fmt[i] == 'E')
+ for (j = 0; j < XVECLEN (op, i); ++j)
+ swap_const_vector_halves (XVECEXP (op, i, j));
+ }
+}
+
+/* Find all subregs of a vector expression that perform a narrowing,
+ and adjust the subreg index to account for doubleword swapping. */
+static void
+adjust_subreg_index (rtx op)
+{
+ enum rtx_code code = GET_CODE (op);
+ if (code == SUBREG
+ && (GET_MODE_SIZE (GET_MODE (op))
+ < GET_MODE_SIZE (GET_MODE (XEXP (op, 0)))))
+ {
+ unsigned int index = SUBREG_BYTE (op);
+ if (index < 8)
+ index += 8;
+ else
+ index -= 8;
+ SUBREG_BYTE (op) = index;
+ }
+
+ const char *fmt = GET_RTX_FORMAT (code);
+ int i,j;
+ for (i = 0; i < GET_RTX_LENGTH (code); ++i)
+ if (fmt[i] == 'e' || fmt[i] == 'u')
+ adjust_subreg_index (XEXP (op, i));
+ else if (fmt[i] == 'E')
+ for (j = 0; j < XVECLEN (op, i); ++j)
+ adjust_subreg_index (XVECEXP (op, i, j));
+}
+
+/* Convert the non-permuting load INSN to a permuting one. */
+static void
+permute_load (rtx insn)
+{
+ rtx body = PATTERN (insn);
+ rtx mem_op = SET_SRC (body);
+ rtx tgt_reg = SET_DEST (body);
+ machine_mode mode = GET_MODE (tgt_reg);
+ int n_elts = GET_MODE_NUNITS (mode);
+ int half_elts = n_elts / 2;
+ rtx par = gen_rtx_PARALLEL (mode, rtvec_alloc (n_elts));
+ int i, j;
+ for (i = 0, j = half_elts; i < half_elts; ++i, ++j)
+ XVECEXP (par, 0, i) = GEN_INT (j);
+ for (i = half_elts, j = 0; j < half_elts; ++i, ++j)
+ XVECEXP (par, 0, i) = GEN_INT (j);
+ rtx sel = gen_rtx_VEC_SELECT (mode, mem_op, par);
+ SET_SRC (body) = sel;
+ INSN_CODE (insn) = -1; /* Force re-recognition. */
+ df_insn_rescan (insn);
+
+ if (dump_file)
+ fprintf (dump_file, "Replacing load %d with permuted load\n",
+ INSN_UID (insn));
+}
+
+/* Convert the non-permuting store INSN to a permuting one. */
+static void
+permute_store (rtx insn)
+{
+ rtx body = PATTERN (insn);
+ rtx src_reg = SET_SRC (body);
+ machine_mode mode = GET_MODE (src_reg);
+ int n_elts = GET_MODE_NUNITS (mode);
+ int half_elts = n_elts / 2;
+ rtx par = gen_rtx_PARALLEL (mode, rtvec_alloc (n_elts));
+ int i, j;
+ for (i = 0, j = half_elts; i < half_elts; ++i, ++j)
+ XVECEXP (par, 0, i) = GEN_INT (j);
+ for (i = half_elts, j = 0; j < half_elts; ++i, ++j)
+ XVECEXP (par, 0, i) = GEN_INT (j);
+ rtx sel = gen_rtx_VEC_SELECT (mode, src_reg, par);
+ SET_SRC (body) = sel;
+ INSN_CODE (insn) = -1; /* Force re-recognition. */
+ df_insn_rescan (insn);
+
+ if (dump_file)
+ fprintf (dump_file, "Replacing store %d with permuted store\n",
+ INSN_UID (insn));
+}
+
+/* Given OP that contains a vector extract operation, adjust the index
+ of the extracted lane to account for the doubleword swap. */
+static void
+adjust_extract (rtx insn)
+{
+ rtx pattern = PATTERN (insn);
+ if (GET_CODE (pattern) == PARALLEL)
+ pattern = XVECEXP (pattern, 0, 0);
+ rtx src = SET_SRC (pattern);
+ /* The vec_select may be wrapped in a vec_duplicate for a splat, so
+ account for that. */
+ rtx sel = GET_CODE (src) == VEC_DUPLICATE ? XEXP (src, 0) : src;
+ rtx par = XEXP (sel, 1);
+ int half_elts = GET_MODE_NUNITS (GET_MODE (XEXP (sel, 0))) >> 1;
+ int lane = INTVAL (XVECEXP (par, 0, 0));
+ lane = lane >= half_elts ? lane - half_elts : lane + half_elts;
+ XVECEXP (par, 0, 0) = GEN_INT (lane);
+ INSN_CODE (insn) = -1; /* Force re-recognition. */
+ df_insn_rescan (insn);
+
+ if (dump_file)
+ fprintf (dump_file, "Changing lane for extract %d\n", INSN_UID (insn));
+}
+
+/* Given OP that contains a vector direct-splat operation, adjust the index
+ of the source lane to account for the doubleword swap. */
+static void
+adjust_splat (rtx insn)
+{
+ rtx body = PATTERN (insn);
+ rtx unspec = XEXP (body, 1);
+ int half_elts = GET_MODE_NUNITS (GET_MODE (unspec)) >> 1;
+ int lane = INTVAL (XVECEXP (unspec, 0, 1));
+ lane = lane >= half_elts ? lane - half_elts : lane + half_elts;
+ XVECEXP (unspec, 0, 1) = GEN_INT (lane);
+ INSN_CODE (insn) = -1; /* Force re-recognition. */
+ df_insn_rescan (insn);
+
+ if (dump_file)
+ fprintf (dump_file, "Changing lane for splat %d\n", INSN_UID (insn));
+}
+
+/* The insn described by INSN_ENTRY[I] can be swapped, but only
+ with special handling. Take care of that here. */
+static void
+handle_special_swappables (swap_web_entry *insn_entry, unsigned i)
+{
+ rtx insn = insn_entry[i].insn;
+ rtx body = PATTERN (insn);
+
+ switch (insn_entry[i].special_handling)
+ {
+ default:
+ gcc_unreachable ();
+ case SH_CONST_VECTOR:
+ {
+ /* A CONST_VECTOR will only show up somewhere in the RHS of a SET. */
+ gcc_assert (GET_CODE (body) == SET);
+ rtx rhs = SET_SRC (body);
+ swap_const_vector_halves (rhs);
+ if (dump_file)
+ fprintf (dump_file, "Swapping constant halves in insn %d\n", i);
+ break;
+ }
+ case SH_SUBREG:
+ /* A subreg of the same size is already safe. For subregs that
+ select a smaller portion of a reg, adjust the index for
+ swapped doublewords. */
+ adjust_subreg_index (body);
+ if (dump_file)
+ fprintf (dump_file, "Adjusting subreg in insn %d\n", i);
+ break;
+ case SH_NOSWAP_LD:
+ /* Convert a non-permuting load to a permuting one. */
+ permute_load (insn);
+ break;
+ case SH_NOSWAP_ST:
+ /* Convert a non-permuting store to a permuting one. */
+ permute_store (insn);
+ break;
+ case SH_EXTRACT:
+ /* Change the lane on an extract operation. */
+ adjust_extract (insn);
+ break;
+ case SH_SPLAT:
+ /* Change the lane on a direct-splat operation. */
+ adjust_splat (insn);
+ break;
+ }
+}
+
+/* Find the insn from the Ith table entry, which is known to be a
+ register swap Y = SWAP(X). Replace it with a copy Y = X. */
+static void
+replace_swap_with_copy (swap_web_entry *insn_entry, unsigned i)
+{
+ rtx insn = insn_entry[i].insn;
+ rtx body = PATTERN (insn);
+ rtx src_reg = XEXP (SET_SRC (body), 0);
+ rtx copy = gen_rtx_SET (VOIDmode, SET_DEST (body), src_reg);
+ rtx new_insn = emit_insn_before (copy, insn);
+ set_block_for_insn (new_insn, BLOCK_FOR_INSN (insn));
+ df_insn_rescan (new_insn);
+
+ if (dump_file)
+ {
+ unsigned int new_uid = INSN_UID (new_insn);
+ fprintf (dump_file, "Replacing swap %d with copy %d\n", i, new_uid);
+ }
+
+ df_insn_delete (BLOCK_FOR_INSN (insn), INSN_UID (insn));
+ remove_insn (insn);
+ INSN_DELETED_P (insn) = 1;
+}
+
+/* Dump the swap table to DUMP_FILE. */
+static void
+dump_swap_insn_table (swap_web_entry *insn_entry)
+{
+ int e = get_max_uid ();
+ fprintf (dump_file, "\nRelevant insns with their flag settings\n\n");
+
+ for (int i = 0; i < e; ++i)
+ if (insn_entry[i].is_relevant)
+ {
+ swap_web_entry *pred_entry = (swap_web_entry *)insn_entry[i].pred ();
+ fprintf (dump_file, "%6d %6d ", i,
+ pred_entry && pred_entry->insn
+ ? INSN_UID (pred_entry->insn) : 0);
+ if (insn_entry[i].is_load)
+ fputs ("load ", dump_file);
+ if (insn_entry[i].is_store)
+ fputs ("store ", dump_file);
+ if (insn_entry[i].is_swap)
+ fputs ("swap ", dump_file);
+ if (insn_entry[i].is_live_in)
+ fputs ("live-in ", dump_file);
+ if (insn_entry[i].is_live_out)
+ fputs ("live-out ", dump_file);
+ if (insn_entry[i].contains_subreg)
+ fputs ("subreg ", dump_file);
+ if (insn_entry[i].is_128_int)
+ fputs ("int128 ", dump_file);
+ if (insn_entry[i].is_call)
+ fputs ("call ", dump_file);
+ if (insn_entry[i].is_swappable)
+ {
+ fputs ("swappable ", dump_file);
+ if (insn_entry[i].special_handling == SH_CONST_VECTOR)
+ fputs ("special:constvec ", dump_file);
+ else if (insn_entry[i].special_handling == SH_SUBREG)
+ fputs ("special:subreg ", dump_file);
+ else if (insn_entry[i].special_handling == SH_NOSWAP_LD)
+ fputs ("special:load ", dump_file);
+ else if (insn_entry[i].special_handling == SH_NOSWAP_ST)
+ fputs ("special:store ", dump_file);
+ else if (insn_entry[i].special_handling == SH_EXTRACT)
+ fputs ("special:extract ", dump_file);
+ else if (insn_entry[i].special_handling == SH_SPLAT)
+ fputs ("special:splat ", dump_file);
+ }
+ if (insn_entry[i].web_not_optimizable)
+ fputs ("unoptimizable ", dump_file);
+ if (insn_entry[i].will_delete)
+ fputs ("delete ", dump_file);
+ fputs ("\n", dump_file);
+ }
+ fputs ("\n", dump_file);
+}
+
+/* Main entry point for this pass. */
+unsigned int
+rs6000_analyze_swaps (function *fun)
+{
+ swap_web_entry *insn_entry;
+ basic_block bb;
+ rtx insn;
+
+ /* Dataflow analysis for use-def chains. */
+ df_set_flags (DF_RD_PRUNE_DEAD_DEFS);
+ df_chain_add_problem (DF_DU_CHAIN | DF_UD_CHAIN);
+ df_analyze ();
+ df_set_flags (DF_DEFER_INSN_RESCAN);
+
+ /* Allocate structure to represent webs of insns. */
+ insn_entry = XCNEWVEC (swap_web_entry, get_max_uid ());
+
+ /* Walk the insns to gather basic data. */
+ FOR_ALL_BB_FN (bb, fun)
+ FOR_BB_INSNS (bb, insn)
+ {
+ unsigned int uid = INSN_UID (insn);
+ if (NONDEBUG_INSN_P (insn))
+ {
+ insn_entry[uid].insn = insn;
+
+ if (GET_CODE (insn) == CALL_INSN)
+ insn_entry[uid].is_call = 1;
+
+ /* Walk the uses and defs to see if we mention vector regs.
+ Record any constraints on optimization of such mentions. */
+ df_ref *use_rec;
+ for (use_rec = DF_INSN_UID_USES (uid); *use_rec; use_rec++)
+ {
+ df_ref mention = *use_rec;
+ /* We use DF_REF_REAL_REG here to get inside any subregs. */
+ machine_mode mode = GET_MODE (DF_REF_REAL_REG (mention));
+
+ /* If a use gets its value from a call insn, it will be
+ a hard register and will look like (reg:V4SI 3 3).
+ The df analysis creates two mentions for GPR3 and GPR4,
+ both DImode. We must recognize this and treat it as a
+ vector mention to ensure the call is unioned with this
+ use. */
+ if (mode == DImode && DF_REF_INSN_INFO (mention))
+ {
+ rtx feeder = DF_REF_INSN (mention);
+ /* FIXME: It is pretty hard to get from the df mention
+ to the mode of the use in the insn. We arbitrarily
+ pick a vector mode here, even though the use might
+ be a real DImode. We can be too conservative
+ (create a web larger than necessary) because of
+ this, so consider eventually fixing this. */
+ if (GET_CODE (feeder) == CALL_INSN)
+ mode = V4SImode;
+ }
+
+ if (VECTOR_MODE_P (mode) || mode == TImode)
+ {
+ insn_entry[uid].is_relevant = 1;
+ if (mode == TImode || mode == V1TImode)
+ insn_entry[uid].is_128_int = 1;
+ if (DF_REF_INSN_INFO (mention))
+ insn_entry[uid].contains_subreg
+ = !rtx_equal_p (DF_REF_REG (mention),
+ DF_REF_REAL_REG (mention));
+ union_defs (insn_entry, insn, mention);
+ }
+ }
+ df_ref *def_rec;
+ for (def_rec = DF_INSN_UID_DEFS (uid); *def_rec; def_rec++)
+ {
+ df_ref mention = *def_rec;
+ /* We use DF_REF_REAL_REG here to get inside any subregs. */
+ machine_mode mode = GET_MODE (DF_REF_REAL_REG (mention));
+
+ /* If we're loading up a hard vector register for a call,
+ it looks like (set (reg:V4SI 9 9) (...)). The df
+ analysis creates two mentions for GPR9 and GPR10, both
+ DImode. So relying on the mode from the mentions
+ isn't sufficient to ensure we union the call into the
+ web with the parameter setup code. */
+ if (mode == DImode && GET_CODE (insn) == SET
+ && VECTOR_MODE_P (GET_MODE (SET_DEST (insn))))
+ mode = GET_MODE (SET_DEST (insn));
+
+ if (VECTOR_MODE_P (mode) || mode == TImode)
+ {
+ insn_entry[uid].is_relevant = 1;
+ if (mode == TImode || mode == V1TImode)
+ insn_entry[uid].is_128_int = 1;
+ if (DF_REF_INSN_INFO (mention))
+ insn_entry[uid].contains_subreg
+ = !rtx_equal_p (DF_REF_REG (mention),
+ DF_REF_REAL_REG (mention));
+ /* REG_FUNCTION_VALUE_P is not valid for subregs. */
+ else if (REG_FUNCTION_VALUE_P (DF_REF_REG (mention)))
+ insn_entry[uid].is_live_out = 1;
+ union_uses (insn_entry, insn, mention);
+ }
+ }
+
+ if (insn_entry[uid].is_relevant)
+ {
+ /* Determine if this is a load or store. */
+ insn_entry[uid].is_load = insn_is_load_p (insn);
+ insn_entry[uid].is_store = insn_is_store_p (insn);
+
+ /* Determine if this is a doubleword swap. If not,
+ determine whether it can legally be swapped. */
+ if (insn_is_swap_p (insn))
+ insn_entry[uid].is_swap = 1;
+ else
+ {
+ unsigned int special = SH_NONE;
+ insn_entry[uid].is_swappable
+ = insn_is_swappable_p (insn_entry, insn, &special);
+ if (special != SH_NONE && insn_entry[uid].contains_subreg)
+ insn_entry[uid].is_swappable = 0;
+ else if (special != SH_NONE)
+ insn_entry[uid].special_handling = special;
+ else if (insn_entry[uid].contains_subreg)
+ insn_entry[uid].special_handling = SH_SUBREG;
+ }
+ }
+ }
+ }
+
+ if (dump_file)
+ {
+ fprintf (dump_file, "\nSwap insn entry table when first built\n");
+ dump_swap_insn_table (insn_entry);
+ }
+
+ /* Record unoptimizable webs. */
+ unsigned e = get_max_uid (), i;
+ for (i = 0; i < e; ++i)
+ {
+ if (!insn_entry[i].is_relevant)
+ continue;
+
+ swap_web_entry *root
+ = (swap_web_entry*)(&insn_entry[i])->unionfind_root ();
+ unsigned uid = INSN_UID (insn_entry[i].insn);
+
+ if (insn_entry[i].is_live_in || insn_entry[i].is_live_out
+ || (insn_entry[i].contains_subreg
+ && insn_entry[i].special_handling != SH_SUBREG)
+ || insn_entry[i].is_128_int || insn_entry[i].is_call
+ || !(insn_entry[i].is_swappable || insn_entry[i].is_swap))
+ root->web_not_optimizable = 1;
+
+ /* If we have loads or stores that aren't permuting then the
+ optimization isn't appropriate. */
+ else if ((insn_entry[i].is_load || insn_entry[i].is_store)
+ && !insn_entry[i].is_swap && !insn_entry[i].is_swappable)
+ root->web_not_optimizable = 1;
+
+ /* If we have permuting loads or stores that are not accompanied
+ by a register swap, the optimization isn't appropriate. */
+ else if (insn_entry[i].is_load && insn_entry[i].is_swap)
+ {
+ df_ref *def_rec;
+
+ for (def_rec = DF_INSN_UID_DEFS (uid); *def_rec; def_rec++)
+ {
+ df_ref def = *def_rec;
+ struct df_link *link = DF_REF_CHAIN (def);
+
+ if (!chain_contains_only_swaps (insn_entry, link, FOR_LOADS))
+ {
+ root->web_not_optimizable = 1;
+ break;
+ }
+ }
+ }
+ else if (insn_entry[i].is_store && insn_entry[i].is_swap)
+ {
+ df_ref *use_rec;
+
+ for (use_rec = DF_INSN_UID_USES (uid); *use_rec; use_rec++)
+ {
+ df_ref use = *use_rec;
+ struct df_link *link = DF_REF_CHAIN (use);
+
+ if (!chain_contains_only_swaps (insn_entry, link, FOR_STORES))
+ {
+ root->web_not_optimizable = 1;
+ break;
+ }
+ }
+ }
+ }
+
+ if (dump_file)
+ {
+ fprintf (dump_file, "\nSwap insn entry table after web analysis\n");
+ dump_swap_insn_table (insn_entry);
+ }
+
+ /* For each load and store in an optimizable web (which implies
+ the loads and stores are permuting), find the associated
+ register swaps and mark them for removal. Due to various
+ optimizations we may mark the same swap more than once. Also
+ perform special handling for swappable insns that require it. */
+ for (i = 0; i < e; ++i)
+ if ((insn_entry[i].is_load || insn_entry[i].is_store)
+ && insn_entry[i].is_swap)
+ {
+ swap_web_entry* root_entry
+ = (swap_web_entry*)((&insn_entry[i])->unionfind_root ());
+ if (!root_entry->web_not_optimizable)
+ mark_swaps_for_removal (insn_entry, i);
+ }
+ else if (insn_entry[i].is_swappable && insn_entry[i].special_handling)
+ {
+ swap_web_entry* root_entry
+ = (swap_web_entry*)((&insn_entry[i])->unionfind_root ());
+ if (!root_entry->web_not_optimizable)
+ handle_special_swappables (insn_entry, i);
+ }
+
+ /* Now delete the swaps marked for removal. */
+ for (i = 0; i < e; ++i)
+ if (insn_entry[i].will_delete)
+ replace_swap_with_copy (insn_entry, i);
+
+ /* Clean up. */
+ free (insn_entry);
+ return 0;
+}
+
struct gcc_target targetm = TARGET_INITIALIZER;
Index: gcc/config/rs6000/vsx.md
===================================================================
--- a/src/gcc/config/rs6000/vsx.md (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/config/rs6000/vsx.md (.../branches/gcc-4_8-branch)
@@ -1781,7 +1781,7 @@
(vec_select:<VS_scalar>
(match_operand:VSX_D 1 "indexed_or_indirect_operand" "Z,Z,Z")
(parallel [(const_int 0)])))]
- "VECTOR_MEM_VSX_P (<MODE>mode) && WORDS_BIG_ENDIAN"
+ "VECTOR_MEM_VSX_P (<MODE>mode)"
"lxsd%U1x %x0,%y1"
[(set (attr "type")
(if_then_else
@@ -1790,21 +1790,6 @@
(const_string "fpload")))
(set_attr "length" "4")])
-;; Optimize extracting element 1 from memory for little endian
-(define_insn "*vsx_extract_<mode>_one_le"
- [(set (match_operand:<VS_scalar> 0 "vsx_register_operand" "=ws,d,?wa")
- (vec_select:<VS_scalar>
- (match_operand:VSX_D 1 "indexed_or_indirect_operand" "Z,Z,Z")
- (parallel [(const_int 1)])))]
- "VECTOR_MEM_VSX_P (<MODE>mode) && !WORDS_BIG_ENDIAN"
- "lxsd%U1x %x0,%y1"
- [(set (attr "type")
- (if_then_else
- (match_test "update_indexed_address_mem (operands[1], VOIDmode)")
- (const_string "fpload_ux")
- (const_string "fpload")))
- (set_attr "length" "4")])
-
;; Extract a SF element from V4SF
(define_insn_and_split "vsx_extract_v4sf"
[(set (match_operand:SF 0 "vsx_register_operand" "=f,f")
Index: gcc/config/rs6000/rs6000.h
===================================================================
--- a/src/gcc/config/rs6000/rs6000.h (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/config/rs6000/rs6000.h (.../branches/gcc-4_8-branch)
@@ -898,7 +898,8 @@
|| (((MODE) == SFmode || (MODE) == DFmode || (MODE) == TFmode \
|| (MODE) == SDmode || (MODE) == DDmode || (MODE) == TDmode) \
&& (ALIGN) < 32) \
- || (VECTOR_MODE_P ((MODE)) && (((int)(ALIGN)) < VECTOR_ALIGN (MODE))))
+ || (!TARGET_EFFICIENT_UNALIGNED_VSX \
+ && (VECTOR_MODE_P ((MODE)) && (((int)(ALIGN)) < VECTOR_ALIGN (MODE)))))
/* Standard register usage. */
Index: gcc/config/rs6000/altivec.md
===================================================================
--- a/src/gcc/config/rs6000/altivec.md (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/config/rs6000/altivec.md (.../branches/gcc-4_8-branch)
@@ -2453,7 +2453,7 @@
}
})
-(define_insn "*altivec_lvx_<mode>_internal"
+(define_insn "altivec_lvx_<mode>_internal"
[(parallel
[(set (match_operand:VM2 0 "register_operand" "=v")
(match_operand:VM2 1 "memory_operand" "Z"))
@@ -2476,7 +2476,7 @@
}
})
-(define_insn "*altivec_stvx_<mode>_internal"
+(define_insn "altivec_stvx_<mode>_internal"
[(parallel
[(set (match_operand:VM2 0 "memory_operand" "=Z")
(match_operand:VM2 1 "register_operand" "v"))
Index: gcc/config/rs6000/crypto.md
===================================================================
--- a/src/gcc/config/rs6000/crypto.md (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/config/rs6000/crypto.md (.../branches/gcc-4_8-branch)
@@ -18,6 +18,15 @@
;; along with GCC; see the file COPYING3. If not see
;; <http://www.gnu.org/licenses/>.
+;; NOTE: Although this file contains all the instructions from
+;; section 5.11 of ISA 2.07, only those in sections 5.11.1 and
+;; 5.11.2 are in Category:Vector.Crypto. Those are the only
+;; ones controlled by -m[no-]crypto.
+
+;; FIXME: The builtin names for the instructions in this file
+;; are likely to be deprecated in favor of other names to be
+;; agreed upon with the XL compilers and LLVM.
+
(define_c_enum "unspec"
[UNSPEC_VCIPHER
UNSPEC_VNCIPHER
@@ -65,7 +74,7 @@
(unspec:CR_mode [(match_operand:CR_mode 1 "register_operand" "v")
(match_operand:CR_mode 2 "register_operand" "v")]
UNSPEC_VPMSUM))]
- "TARGET_CRYPTO"
+ "TARGET_P8_VECTOR"
"vpmsum<CR_char> %0,%1,%2"
[(set_attr "type" "crypto")])
@@ -76,7 +85,7 @@
(match_operand:CR_mode 2 "register_operand" "v")
(match_operand:CR_mode 3 "register_operand" "v")]
UNSPEC_VPERMXOR))]
- "TARGET_CRYPTO"
+ "TARGET_P8_VECTOR"
"vpermxor %0,%1,%2,%3"
[(set_attr "type" "crypto")])
Index: gcc/config/rs6000/rs6000.md
===================================================================
--- a/src/gcc/config/rs6000/rs6000.md (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/config/rs6000/rs6000.md (.../branches/gcc-4_8-branch)
@@ -8622,8 +8622,8 @@
[(set (match_operand:BOOL_128 0 "vlogical_operand" "=<BOOL_REGS_OUTPUT>")
(match_operator:BOOL_128 3 "boolean_operator"
[(not:BOOL_128
- (match_operand:BOOL_128 2 "vlogical_operand" "<BOOL_REGS_OP1>"))
- (match_operand:BOOL_128 1 "vlogical_operand" "<BOOL_REGS_OP2>")]))]
+ (match_operand:BOOL_128 2 "vlogical_operand" "<BOOL_REGS_OP2>"))
+ (match_operand:BOOL_128 1 "vlogical_operand" "<BOOL_REGS_OP1>")]))]
"TARGET_P8_VECTOR || (GET_CODE (operands[3]) == AND)"
{
if (TARGET_VSX && vsx_register_operand (operands[0], <MODE>mode))
@@ -8638,7 +8638,7 @@
&& reload_completed && int_reg_operand (operands[0], <MODE>mode)"
[(const_int 0)]
{
- rs6000_split_logical (operands, GET_CODE (operands[3]), false, true, false,
+ rs6000_split_logical (operands, GET_CODE (operands[3]), false, false, true,
NULL_RTX);
DONE;
}
@@ -8660,14 +8660,14 @@
[(set (match_operand:TI2 0 "int_reg_operand" "=&r,r,r")
(match_operator:TI2 3 "boolean_operator"
[(not:TI2
- (match_operand:TI2 1 "int_reg_operand" "r,0,r"))
- (match_operand:TI2 2 "int_reg_operand" "r,r,0")]))]
+ (match_operand:TI2 2 "int_reg_operand" "r,0,r"))
+ (match_operand:TI2 1 "int_reg_operand" "r,r,0")]))]
"!TARGET_P8_VECTOR && (GET_CODE (operands[3]) != AND)"
"#"
"reload_completed && !TARGET_P8_VECTOR && (GET_CODE (operands[3]) != AND)"
[(const_int 0)]
{
- rs6000_split_logical (operands, GET_CODE (operands[3]), false, true, false,
+ rs6000_split_logical (operands, GET_CODE (operands[3]), false, false, true,
NULL_RTX);
DONE;
}
Index: gcc/config/rs6000/driver-rs6000.c
===================================================================
--- a/src/gcc/config/rs6000/driver-rs6000.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/config/rs6000/driver-rs6000.c (.../branches/gcc-4_8-branch)
@@ -1,5 +1,5 @@
/* Subroutines for the gcc driver.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2015 Free Software Foundation, Inc.
This file is part of GCC.
@@ -327,6 +327,12 @@
case 0x4000:
return "power6";
+ case 0x8000:
+ return "power7";
+
+ case 0x10000:
+ return "power8";
+
default:
return "powerpc";
}
Index: gcc/config/arm/arm.c
===================================================================
--- a/src/gcc/config/arm/arm.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/config/arm/arm.c (.../branches/gcc-4_8-branch)
@@ -13337,7 +13337,7 @@
fputc ('\n', dump_file);
}
- switch (mp->fix_size)
+ switch (GET_MODE_SIZE (mp->mode))
{
#ifdef HAVE_consttable_1
case 1:
@@ -15626,6 +15626,14 @@
fputs ("\"\n", stream);
}
+/* Whether a register is callee saved or not. This is necessary because high
+ registers are marked as caller saved when optimizing for size on Thumb-1
+ targets despite being callee saved in order to avoid using them. */
+#define callee_saved_reg_p(reg) \
+ (!call_used_regs[reg] \
+ || (TARGET_THUMB1 && optimize_size \
+ && reg >= FIRST_HI_REGNUM && reg <= LAST_HI_REGNUM))
+
/* Compute the register save mask for registers 0 through 12
inclusive. This code is used by arm_compute_save_reg_mask. */
@@ -15686,7 +15694,7 @@
/* In the normal case we only need to save those registers
which are call saved and which are used by this function. */
for (reg = 0; reg <= 11; reg++)
- if (df_regs_ever_live_p (reg) && ! call_used_regs[reg])
+ if (df_regs_ever_live_p (reg) && callee_saved_reg_p (reg))
save_reg_mask |= (1 << reg);
/* Handle the frame pointer as a special case. */
@@ -15840,7 +15848,7 @@
mask = 0;
for (reg = 0; reg < 12; reg ++)
- if (df_regs_ever_live_p (reg) && !call_used_regs[reg])
+ if (df_regs_ever_live_p (reg) && callee_saved_reg_p (reg))
mask |= 1 << reg;
if (flag_pic
@@ -15873,7 +15881,7 @@
if (reg * UNITS_PER_WORD <= (unsigned) arm_size_return_regs ())
reg = LAST_LO_REGNUM;
- if (! call_used_regs[reg])
+ if (callee_saved_reg_p (reg))
mask |= 1 << reg;
}
Index: gcc/config/arm/arm.h
===================================================================
--- a/src/gcc/config/arm/arm.h (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/config/arm/arm.h (.../branches/gcc-4_8-branch)
@@ -63,8 +63,8 @@
builtin_define_with_int_value ( \
"__ARM_SIZEOF_MINIMAL_ENUM", \
flag_short_enums ? 1 : 4); \
- builtin_define_with_int_value ( \
- "__ARM_SIZEOF_WCHAR_T", WCHAR_TYPE_SIZE); \
+ builtin_define_type_sizeof ("__ARM_SIZEOF_WCHAR_T", \
+ wchar_type_node); \
if (TARGET_ARM_ARCH_PROFILE) \
builtin_define_with_int_value ( \
"__ARM_ARCH_PROFILE", TARGET_ARM_ARCH_PROFILE); \
Index: gcc/config/arm/arm.md
===================================================================
--- a/src/gcc/config/arm/arm.md (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/config/arm/arm.md (.../branches/gcc-4_8-branch)
@@ -11096,7 +11096,7 @@
(define_insn "consttable_1"
[(unspec_volatile [(match_operand 0 "" "")] VUNSPEC_POOL_1)]
- "TARGET_THUMB1"
+ "TARGET_EITHER"
"*
making_const_table = TRUE;
assemble_integer (operands[0], 1, BITS_PER_WORD, 1);
@@ -11108,14 +11108,23 @@
(define_insn "consttable_2"
[(unspec_volatile [(match_operand 0 "" "")] VUNSPEC_POOL_2)]
- "TARGET_THUMB1"
+ "TARGET_EITHER"
"*
- making_const_table = TRUE;
- gcc_assert (GET_MODE_CLASS (GET_MODE (operands[0])) != MODE_FLOAT);
- assemble_integer (operands[0], 2, BITS_PER_WORD, 1);
- assemble_zeros (2);
- return \"\";
- "
+ {
+ rtx x = operands[0];
+ making_const_table = TRUE;
+ switch (GET_MODE_CLASS (GET_MODE (x)))
+ {
+ case MODE_FLOAT:
+ arm_emit_fp16_const (x);
+ break;
+ default:
+ assemble_integer (operands[0], 2, BITS_PER_WORD, 1);
+ assemble_zeros (2);
+ break;
+ }
+ return \"\";
+ }"
[(set_attr "length" "4")]
)
@@ -11129,15 +11138,12 @@
switch (GET_MODE_CLASS (GET_MODE (x)))
{
case MODE_FLOAT:
- if (GET_MODE (x) == HFmode)
- arm_emit_fp16_const (x);
- else
- {
- REAL_VALUE_TYPE r;
- REAL_VALUE_FROM_CONST_DOUBLE (r, x);
- assemble_real (r, GET_MODE (x), BITS_PER_WORD);
- }
- break;
+ {
+ REAL_VALUE_TYPE r;
+ REAL_VALUE_FROM_CONST_DOUBLE (r, x);
+ assemble_real (r, GET_MODE (x), BITS_PER_WORD);
+ break;
+ }
default:
/* XXX: Sometimes gcc does something really dumb and ends up with
a HIGH in a constant pool entry, usually because it's trying to
Index: gcc/config/pa/pa.c
===================================================================
--- a/src/gcc/config/pa/pa.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/config/pa/pa.c (.../branches/gcc-4_8-branch)
@@ -2585,29 +2585,30 @@
&& GET_CODE (XEXP (addr, 0)) == MULT)
{
rtx xoperands[4];
- rtx high_reg = gen_rtx_SUBREG (SImode, operands[0], 0);
- if (!reg_overlap_mentioned_p (high_reg, addr))
- {
- xoperands[0] = high_reg;
- xoperands[1] = XEXP (addr, 1);
- xoperands[2] = XEXP (XEXP (addr, 0), 0);
- xoperands[3] = XEXP (XEXP (addr, 0), 1);
- output_asm_insn ("{sh%O3addl %2,%1,%0|shladd,l %2,%O3,%1,%0}",
- xoperands);
- return "ldw 4(%0),%R0\n\tldw 0(%0),%0";
- }
- else
- {
- xoperands[0] = high_reg;
- xoperands[1] = XEXP (addr, 1);
- xoperands[2] = XEXP (XEXP (addr, 0), 0);
- xoperands[3] = XEXP (XEXP (addr, 0), 1);
- output_asm_insn ("{sh%O3addl %2,%1,%R0|shladd,l %2,%O3,%1,%R0}",
- xoperands);
- return "ldw 0(%R0),%0\n\tldw 4(%R0),%R0";
- }
+ /* Load address into left half of destination register. */
+ xoperands[0] = gen_rtx_SUBREG (SImode, operands[0], 0);
+ xoperands[1] = XEXP (addr, 1);
+ xoperands[2] = XEXP (XEXP (addr, 0), 0);
+ xoperands[3] = XEXP (XEXP (addr, 0), 1);
+ output_asm_insn ("{sh%O3addl %2,%1,%0|shladd,l %2,%O3,%1,%0}",
+ xoperands);
+ return "ldw 4(%0),%R0\n\tldw 0(%0),%0";
}
+ else if (GET_CODE (addr) == PLUS
+ && REG_P (XEXP (addr, 0))
+ && REG_P (XEXP (addr, 1)))
+ {
+ rtx xoperands[3];
+
+ /* Load address into left half of destination register. */
+ xoperands[0] = gen_rtx_SUBREG (SImode, operands[0], 0);
+ xoperands[1] = XEXP (addr, 0);
+ xoperands[2] = XEXP (addr, 1);
+ output_asm_insn ("{addl|add,l} %1,%2,%0",
+ xoperands);
+ return "ldw 4(%0),%R0\n\tldw 0(%0),%0";
+ }
}
/* If an operand is an unoffsettable memory ref, find a register
Index: gcc/tree-vect-slp.c
===================================================================
--- a/src/gcc/tree-vect-slp.c (.../tags/gcc_4_8_4_release)
+++ b/src/gcc/tree-vect-slp.c (.../branches/gcc-4_8-branch)
@@ -1805,52 +1805,84 @@
can't be SLPed) in the tree rooted at NODE. Mark such stmts as HYBRID. */
static void
-vect_detect_hybrid_slp_stmts (slp_tree node)
+vect_detect_hybrid_slp_stmts (slp_tree node, unsigned i, slp_vect_type stype)
{
- int i;
- vec<gimple> stmts = SLP_TREE_SCALAR_STMTS (node);
- gimple stmt = stmts[0];
+ gimple stmt = SLP_TREE_SCALAR_STMTS (node)[i];
imm_use_iterator imm_iter;
gimple use_stmt;
- stmt_vec_info stmt_vinfo = vinfo_for_stmt (stmt);
+ stmt_vec_info use_vinfo, stmt_vinfo = vinfo_for_stmt (stmt);
slp_void_p child;
loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_vinfo);
- struct loop *loop = NULL;
- bb_vec_info bb_vinfo = STMT_VINFO_BB_VINFO (stmt_vinfo);
- basic_block bb = NULL;
+ struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
+ int j;
- if (!node)
- return;
-
- if (loop_vinfo)
- loop = LOOP_VINFO_LOOP (loop_vinfo);
+ /* Propagate hybrid down the SLP tree. */
+ if (stype == hybrid)
+ ;
+ else if (HYBRID_SLP_STMT (stmt_vinfo))
+ stype = hybrid;
else
- bb = BB_VINFO_BB (bb_vinfo);
+ {
+ /* Check if a pure SLP stmt has uses in non-SLP stmts. */
+ gcc_checking_assert (PURE_SLP_STMT (stmt_vinfo));
+ if (TREE_CODE (gimple_op (stmt, 0)) == SSA_NAME)
+ FOR_EACH_IMM_USE_STMT (use_stmt, imm_iter, gimple_op (stmt, 0))
+ if (gimple_bb (use_stmt)
+ && flow_bb_inside_loop_p (loop, gimple_bb (use_stmt))
+ && (use_vinfo = vinfo_for_stmt (use_stmt))
+ && !STMT_SLP_TYPE (use_vinfo)
+ && (STMT_VINFO_RELEVANT (use_vinfo)
+ || VECTORIZABLE_CYCLE_DEF (STMT_VINFO_DEF_TYPE (use_vinfo))
+ || (STMT_VINFO_IN_PATTERN_P (use_vinfo)
+ && STMT_VINFO_RELATED_STMT (use_vinfo)
+ && !STMT_SLP_TYPE (vinfo_for_stmt
+ (STMT_VINFO_RELATED_STMT (use_vinfo)))))
+ && !(gimple_code (use_stmt) == GIMPLE_PHI
+ && STMT_VINFO_DEF_TYPE (use_vinfo) == vect_reduction_def))
+ stype = hybrid;
+ }
- FOR_EACH_VEC_ELT (SLP_TREE_SCALAR_STMTS (node), i, stmt)
- if (PURE_SLP_STMT (vinfo_for_stmt (stmt))
- && TREE_CODE (gimple_op (stmt, 0)) == SSA_NAME)
- FOR_EACH_IMM_USE_STMT (use_stmt, imm_iter, gimple_op (stmt, 0))
- if (gimple_bb (use_stmt)
- && ((loop && flow_bb_inside_loop_p (loop, gimple_bb (use_stmt)))
- || bb == gimple_bb (use_stmt))
- && (stmt_vinfo = vinfo_for_stmt (use_stmt))
- && !STMT_SLP_TYPE (stmt_vinfo)
- && (STMT_VINFO_RELEVANT (stmt_vinfo)
- || VECTORIZABLE_CYCLE_DEF (STMT_VINFO_DEF_TYPE (stmt_vinfo))
- || (STMT_VINFO_IN_PATTERN_P (stmt_vinfo)
- && STMT_VINFO_RELATED_STMT (stmt_vinfo)
- && !STMT_SLP_TYPE (vinfo_for_stmt (STMT_VINFO_RELATED_STMT (stmt_vinfo)))))
- && !(gimple_code (use_stmt) == GIMPLE_PHI
- && STMT_VINFO_DEF_TYPE (stmt_vinfo)
- == vect_reduction_def))
- vect_mark_slp_stmts (node, hybrid, i);
+ if (stype == hybrid)
+ STMT_SLP_TYPE (stmt_vinfo) = hybrid;
- FOR_EACH_VEC_ELT (SLP_TREE_CHILDREN (node), i, child)
- vect_detect_hybrid_slp_stmts ((slp_tree) child);
+ FOR_EACH_VEC_ELT (SLP_TREE_CHILDREN (node), j, child)
+ vect_detect_hybrid_slp_stmts ((slp_tree) child, i, stype);
}
+/* Helpers for vect_detect_hybrid_slp walking pattern stmt uses. */
+static tree
+vect_detect_hybrid_slp_1 (tree *tp, int *, void *data)
+{
+ walk_stmt_info *wi = (walk_stmt_info *)data;
+ struct loop *loopp = (struct loop *)wi->info;
+
+ if (wi->is_lhs)
+ return NULL_TREE;
+
+ if (TREE_CODE (*tp) == SSA_NAME
+ && !SSA_NAME_IS_DEFAULT_DEF (*tp))
+ {
+ gimple def_stmt = SSA_NAME_DEF_STMT (*tp);
+ if (flow_bb_inside_loop_p (loopp, gimple_bb (def_stmt))
+ && PURE_SLP_STMT (vinfo_for_stmt (def_stmt)))
+ STMT_SLP_TYPE (vinfo_for_stmt (def_stmt)) = hybrid;
+ }
+
+ return NULL_TREE;
+}
+
+static tree
+vect_detect_hybrid_slp_2 (gimple_stmt_iterator *gsi, bool *handled,
+ walk_stmt_info *)
+{
+ /* If the stmt is in a SLP instance then this isn't a reason
+ to mark use definitions in other SLP instances as hybrid. */
+ if (STMT_SLP_TYPE (vinfo_for_stmt (gsi_stmt (*gsi))) != loop_vect)
+ *handled = true;
+ return NULL_TREE;
+}
+
/* Find stmts that must be both vectorized and SLPed. */
void
@@ -1863,8 +1895,41 @@
if (dump_enabled_p ())
dump_printf_loc (MSG_NOTE, vect_location, "=== vect_detect_hybrid_slp ===");
+ /* First walk all pattern stmt in the loop and mark defs of uses as
+ hybrid because immediate uses in them are not recorded. */
+ for (i = 0; i < LOOP_VINFO_LOOP (loop_vinfo)->num_nodes; ++i)
+ {
+ basic_block bb = LOOP_VINFO_BBS (loop_vinfo)[i];
+ for (gimple_stmt_iterator gsi = gsi_start_bb (bb); !gsi_end_p (gsi);
+ gsi_next (&gsi))
+ {
+ gimple stmt = gsi_stmt (gsi);
+ stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
+ if (STMT_VINFO_IN_PATTERN_P (stmt_info))
+ {
+ walk_stmt_info wi;
+ memset (&wi, 0, sizeof (wi));
+ wi.info = LOOP_VINFO_LOOP (loop_vinfo);
+ gimple_stmt_iterator gsi2
+ = gsi_for_stmt (STMT_VINFO_RELATED_STMT (stmt_info));
+ walk_gimple_stmt (&gsi2, vect_detect_hybrid_slp_2,
+ vect_detect_hybrid_slp_1, &wi);
+ walk_gimple_seq (STMT_VINFO_PATTERN_DEF_SEQ (stmt_info),
+ vect_detect_hybrid_slp_2,
+ vect_detect_hybrid_slp_1, &wi);
+ }
+ }
+ }
+
+ /* Then walk the SLP instance trees marking stmts with uses in
+ non-SLP stmts as hybrid, also propagating hybrid down the
+ SLP tree, collecting the above info on-the-fly. */
FOR_EACH_VEC_ELT (slp_instances, i, instance)
- vect_detect_hybrid_slp_stmts (SLP_INSTANCE_TREE (instance));
+ {
+ for (unsigned i = 0; i < SLP_INSTANCE_GROUP_SIZE (instance); ++i)
+ vect_detect_hybrid_slp_stmts (SLP_INSTANCE_TREE (instance),
+ i, pure_slp);
+ }
}
Index: libgfortran/ChangeLog
===================================================================
--- a/src/libgfortran/ChangeLog (.../tags/gcc_4_8_4_release)
+++ b/src/libgfortran/ChangeLog (.../branches/gcc-4_8-branch)
@@ -1,3 +1,21 @@
+2015-03-30 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR libgfortran/59513
+ * io/transfer.c (data_transfer_init): Do not error for
+ -std=legacy.
+
+2015-03-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR libgfortran/60956
+ Backport from mainline
+ * io/fbuf.c (fbuf_flush_list): New function that only flushes
+ if current fbuf position exceeds a limit.
+ * io/fbuf.h: Declare the new function.
+ * io/io.h (enum unit_mode): Add two new modes.
+ * io/list_read.c (list_formatted_read_scalar): Call new function.
+ * io/write.c: Include fbuf.h. (list_formatted_write_scalar):
+ Call new function.
+
2014-12-19 Release Manager
* GCC 4.8.4 released.
Index: libgfortran/io/list_read.c
===================================================================
--- a/src/libgfortran/io/list_read.c (.../tags/gcc_4_8_4_release)
+++ b/src/libgfortran/io/list_read.c (.../branches/gcc-4_8-branch)
@@ -2001,6 +2001,7 @@
free_line (dtp);
hit_eof (dtp);
}
+ fbuf_flush_list (dtp->u.p.current_unit, LIST_READING);
return err;
}
Index: libgfortran/io/io.h
===================================================================
--- a/src/libgfortran/io/io.h (.../tags/gcc_4_8_4_release)
+++ b/src/libgfortran/io/io.h (.../branches/gcc-4_8-branch)
@@ -201,7 +201,7 @@
unit_advance;
typedef enum
-{READING, WRITING}
+{READING, WRITING, LIST_READING, LIST_WRITING}
unit_mode;
typedef enum
Index: libgfortran/io/fbuf.c
===================================================================
--- a/src/libgfortran/io/fbuf.c (.../tags/gcc_4_8_4_release)
+++ b/src/libgfortran/io/fbuf.c (.../branches/gcc-4_8-branch)
@@ -174,7 +174,43 @@
}
+/* The mode argument is LIST_WRITING for write mode and LIST_READING for
+ read. This should only be used for list directed I/O.
+ Return value is 0 for success, -1 on failure. */
+
int
+fbuf_flush_list (gfc_unit * u, unit_mode mode)
+{
+ int nwritten;
+
+ if (!u->fbuf)
+ return 0;
+
+ if (u->fbuf->pos < 524288) /* Upper limit for list writing. */
+ return 0;
+
+ fbuf_debug (u, "fbuf_flush_list with mode %d: ", mode);
+
+ if (mode == LIST_WRITING)
+ {
+ nwritten = swrite (u->s, u->fbuf->buf, u->fbuf->pos);
+ if (nwritten < 0)
+ return -1;
+ }
+
+ /* Salvage remaining bytes for both reading and writing. */
+ if (u->fbuf->act > u->fbuf->pos)
+ memmove (u->fbuf->buf, u->fbuf->buf + u->fbuf->pos,
+ u->fbuf->act - u->fbuf->pos);
+
+ u->fbuf->act -= u->fbuf->pos;
+ u->fbuf->pos = 0;
+
+ return 0;
+}
+
+
+int
fbuf_seek (gfc_unit * u, int off, int whence)
{
if (!u->fbuf)
Index: libgfortran/io/transfer.c
===================================================================
--- a/src/libgfortran/io/transfer.c (.../tags/gcc_4_8_4_release)
+++ b/src/libgfortran/io/transfer.c (.../branches/gcc-4_8-branch)
@@ -2529,15 +2529,16 @@
return;
}
- if (dtp->u.p.current_unit->endfile == AFTER_ENDFILE)
- {
+ if (compile_options.warn_std &&
+ dtp->u.p.current_unit->endfile == AFTER_ENDFILE)
+ {
generate_error (&dtp->common, LIBERROR_OPTION_CONFLICT,
"Sequential READ or WRITE not allowed after "
"EOF marker, possibly use REWIND or BACKSPACE");
return;
}
+ }
- }
/* Process the ADVANCE option. */
dtp->u.p.advance_status
Index: libgfortran/io/fbuf.h
===================================================================
--- a/src/libgfortran/io/fbuf.h (.../tags/gcc_4_8_4_release)
+++ b/src/libgfortran/io/fbuf.h (.../branches/gcc-4_8-branch)
@@ -59,6 +59,9 @@
extern int fbuf_flush (gfc_unit *, unit_mode);
internal_proto(fbuf_flush);
+extern int fbuf_flush_list (gfc_unit *, unit_mode);
+internal_proto(fbuf_flush_list);
+
extern int fbuf_seek (gfc_unit *, int, int);
internal_proto(fbuf_seek);
Index: libgfortran/io/write.c
===================================================================
--- a/src/libgfortran/io/write.c (.../tags/gcc_4_8_4_release)
+++ b/src/libgfortran/io/write.c (.../branches/gcc-4_8-branch)
@@ -25,6 +25,7 @@
<http://www.gnu.org/licenses/>. */
#include "io.h"
+#include "fbuf.h"
#include "format.h"
#include "unix.h"
#include <assert.h>
@@ -1577,6 +1578,7 @@
internal_error (&dtp->common, "list_formatted_write(): Bad type");
}
+ fbuf_flush_list (dtp->u.p.current_unit, LIST_WRITING);
dtp->u.p.char_flag = (type == BT_CHARACTER);
}
|