Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Side by Side Diff: tests_lit/llvm2ice_tests/64bit.pnacl.ll

Issue 1223133007: Factor out prelowerPhi for 32-bit targets. Disable adv phi lowering for ARM. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: fill in wqthe random test case for more undef stuff Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/IceTargetLoweringX86BaseImpl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 \ 6 ; RUN: --target x8632 -i %s --args -O2 \
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 \ 10 ; RUN: --target x8632 -i %s --args -Om1 \
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 ; ARM32: movw [[REG2:r.*]], {{.*}} ; 0x5678 151 ; ARM32: movw [[REG2:r.*]], {{.*}} ; 0x5678
152 ; ARM32: movt [[REG2:r.*]], {{.*}} ; 0x1234 152 ; ARM32: movt [[REG2:r.*]], {{.*}} ; 0x1234
153 ; ARM32: str [[REG1]], [sp, #4] 153 ; ARM32: str [[REG1]], [sp, #4]
154 ; ARM32: str [[REG2]], [sp] 154 ; ARM32: str [[REG2]], [sp]
155 ; ARM32: {{mov|ldr}} r0 155 ; ARM32: {{mov|ldr}} r0
156 ; ARM32: {{mov|ldr}} r1 156 ; ARM32: {{mov|ldr}} r1
157 ; ARM32: movw r2, #123 157 ; ARM32: movw r2, #123
158 ; ARM32: bl {{.*}} ignore64BitArgNoInline 158 ; ARM32: bl {{.*}} ignore64BitArgNoInline
159 ; ARM32: add sp, {{.*}} #16 159 ; ARM32: add sp, {{.*}} #16
160 160
161 define internal i32 @pass64BitUndefArg() {
162 entry:
163 %call = call i32 @ignore64BitArgNoInline(i64 0, i32 123, i64 undef)
164 ret i32 %call
165 }
166 ; CHECK-LABEL: pass64BitUndefArg
167 ; CHECK: sub esp
168 ; CHECK: mov DWORD PTR{{.*}},0x7b
169 ; CHECK: mov DWORD PTR{{.*}},0x0
170 ; CHECK: call {{.*}} R_{{.*}} ignore64BitArgNoInline
171 ; OPTM1-LABEL: pass64BitUndefArg
172 ; OPTM1: sub esp
173 ; OPTM1: mov DWORD PTR{{.*}},0x7b
174 ; OPTM1: mov DWORD PTR{{.*}},0x0
175 ; OPTM1: call {{.*}} R_{{.*}} ignore64BitArgNoInline
176 ; ARM32-LABEL: pass64BitUndefArg
177 ; ARM32: sub sp
178 ; ARM32: movw {{.*}}, #0
179 ; ARM32: str
180 ; ARM32: movw {{.*}}, #123
181 ; ARM32: bl {{.*}} ignore64BitArgNoInline
182
161 define internal i64 @return64BitArg(i64 %padding, i64 %a) { 183 define internal i64 @return64BitArg(i64 %padding, i64 %a) {
162 entry: 184 entry:
163 ret i64 %a 185 ret i64 %a
164 } 186 }
165 ; CHECK-LABEL: return64BitArg 187 ; CHECK-LABEL: return64BitArg
166 ; CHECK: mov {{.*}},DWORD PTR [esp+0xc] 188 ; CHECK: mov {{.*}},DWORD PTR [esp+0xc]
167 ; CHECK: mov {{.*}},DWORD PTR [esp+0x10] 189 ; CHECK: mov {{.*}},DWORD PTR [esp+0x10]
168 ; 190 ;
169 ; OPTM1-LABEL: return64BitArg 191 ; OPTM1-LABEL: return64BitArg
170 ; OPTM1: mov {{.*}},DWORD PTR [esp+0xc] 192 ; OPTM1: mov {{.*}},DWORD PTR [esp+0xc]
(...skipping 1566 matching lines...) Expand 10 before | Expand all | Expand 10 after
1737 ret void 1759 ret void
1738 } 1760 }
1739 ; The following checks are not strictly necessary since one of the RUN 1761 ; The following checks are not strictly necessary since one of the RUN
1740 ; lines actually runs the output through the assembler. 1762 ; lines actually runs the output through the assembler.
1741 ; CHECK-LABEL: icmpLt64Imm 1763 ; CHECK-LABEL: icmpLt64Imm
1742 ; CHECK-NOT: cmp 0x{{[0-9a-f]+}}, 1764 ; CHECK-NOT: cmp 0x{{[0-9a-f]+}},
1743 ; OPTM1-LABEL: icmpLt64Imm 1765 ; OPTM1-LABEL: icmpLt64Imm
1744 ; OPTM1-NOT: cmp 0x{{[0-9a-f]+}}, 1766 ; OPTM1-NOT: cmp 0x{{[0-9a-f]+}},
1745 ; ARM32-LABEL: icmpLt64Imm 1767 ; ARM32-LABEL: icmpLt64Imm
1746 ; ARM32-NOT: cmp #{{[0-9a-f]+}}, 1768 ; ARM32-NOT: cmp #{{[0-9a-f]+}},
1769
1770 define internal i64 @phi64Imm(i32 %x, i64 %y, i64 %z) {
1771 entry:
1772 %cond = icmp eq i32 %x, 88
1773 br i1 %cond, label %branch1, label %branch2
1774 branch1:
1775 %tmp = add i64 %y, %z
1776 br label %branch2
1777
1778 branch2:
1779 %merge = phi i64 [ %tmp, %branch1 ], [ 20014547621496, %entry ]
1780 ret i64 %merge
1781 }
1782 ; CHECK-LABEL: phi64Imm
1783 ; CHECK: mov {{.*}},0x5678
1784 ; CHECK: mov {{.*}},0x1234
1785 ; OPTM1-LABEL: phi64Imm
1786 ; OPTM1: mov {{.*}},0x5678
1787 ; OPTM1: mov {{.*}},0x1234
1788 ; ARM32-LABEL: phi64Imm
1789 ; ARM32: movw {{.*}}, #22136 ; 0x5678
1790 ; ARM32: movw {{.*}}, #4660 ; 0x1234
1791
1792 define internal i64 @phi64Undef(i32 %x, i64 %y, i64 %z) {
1793 entry:
1794 %cond = icmp eq i32 %x, 88
1795 br i1 %cond, label %branch1, label %branch2
1796 branch1:
1797 %tmp = add i64 %y, %z
1798 br label %branch2
1799
1800 branch2:
1801 %merge = phi i64 [ %tmp, %branch1 ], [ undef, %entry ]
1802 ret i64 %merge
1803 }
1804
1805 ; CHECK-LABEL: phi64Undef
1806 ; CHECK: mov {{.*}},0x0
1807 ; CHECK: mov {{.*}},0x0
1808 ; OPTM1-LABEL: phi64Undef
1809 ; OPTM1: mov {{.*}},0x0
1810 ; OPTM1: mov {{.*}},0x0
1811 ; ARM32-LABEL: phi64Undef
1812 ; ARM32: mov {{.*}} #0
1813 ; ARM32: mov {{.*}} #0
1814
OLDNEW
« no previous file with comments | « src/IceTargetLoweringX86BaseImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698