| OLD | NEW |
| 1 ; This tries to be a comprehensive test of i64 operations, in | 1 ; This tries to be a comprehensive test of i64 operations, in |
| 2 ; particular the patterns for lowering i64 operations into constituent | 2 ; particular the patterns for lowering i64 operations into constituent |
| 3 ; i32 operations on x86-32. | 3 ; i32 operations on x86-32. |
| 4 | 4 |
| 5 ; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \ | 5 ; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \ |
| 6 ; RUN: --target x8632 -i %s --args -O2 -allow-externally-defined-symbols \ | 6 ; RUN: --target x8632 -i %s --args -O2 -allow-externally-defined-symbols \ |
| 7 ; RUN: | %if --need=target_X8632 --command FileCheck %s | 7 ; RUN: | %if --need=target_X8632 --command FileCheck %s |
| 8 | 8 |
| 9 ; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \ | 9 ; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \ |
| 10 ; RUN: --target x8632 -i %s --args -Om1 -allow-externally-defined-symbols \ | 10 ; RUN: --target x8632 -i %s --args -Om1 -allow-externally-defined-symbols \ |
| (...skipping 1936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1947 | 1947 |
| 1948 ; CHECK-LABEL: phi64Undef | 1948 ; CHECK-LABEL: phi64Undef |
| 1949 ; CHECK: mov {{.*}},0x0 | 1949 ; CHECK: mov {{.*}},0x0 |
| 1950 ; CHECK: mov {{.*}},0x0 | 1950 ; CHECK: mov {{.*}},0x0 |
| 1951 ; OPTM1-LABEL: phi64Undef | 1951 ; OPTM1-LABEL: phi64Undef |
| 1952 ; OPTM1: mov {{.*}},0x0 | 1952 ; OPTM1: mov {{.*}},0x0 |
| 1953 ; OPTM1: mov {{.*}},0x0 | 1953 ; OPTM1: mov {{.*}},0x0 |
| 1954 ; ARM32-LABEL: phi64Undef | 1954 ; ARM32-LABEL: phi64Undef |
| 1955 ; ARM32: mov {{.*}} #0 | 1955 ; ARM32: mov {{.*}} #0 |
| 1956 ; ARM32: mov {{.*}} #0 | 1956 ; ARM32: mov {{.*}} #0 |
| 1957 |
| 1958 define internal i32 @addOneToUpperAfterShift(i64 %value) { |
| 1959 %a = add i64 %value, 1 |
| 1960 %s = lshr i64 %a, 40 |
| 1961 %t = trunc i64 %s to i32 |
| 1962 %r = add i32 %t, 1 |
| 1963 ret i32 %r |
| 1964 ; ARM32-LABEL: addOneToUpperAfterShift |
| 1965 ; ARM32: adds |
| 1966 ; ARM32: adc |
| 1967 ; ARM32: lsr |
| 1968 ; ARM32: add |
| 1969 } |
| 1970 |
| 1971 define internal i32 @subOneToUpperAfterShift(i64 %value) { |
| 1972 %a = sub i64 %value, 1 |
| 1973 %s = lshr i64 %a, 40 |
| 1974 %t = trunc i64 %s to i32 |
| 1975 %r = sub i32 %t, 1 |
| 1976 ret i32 %r |
| 1977 ; ARM32-LABEL: subOneToUpperAfterShift |
| 1978 ; ARM32: subs |
| 1979 ; ARM32: sbc |
| 1980 ; ARM32: lsr |
| 1981 ; ARM32: sub |
| 1982 } |
| OLD | NEW |