brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 5232443 Raw
46 lines · plain
1; RUN: llc %s -mtriple=thumbv7-apple-darwin -mcpu=cortex-a8 -o -2 3; When a i64 sub is expanded to subc + sube.4;   libcall #15;      \6;       \        subc 7;        \       /  \8;         \     /    \9;          \   /    libcall #210;           sube11;12; If the libcalls are not serialized (i.e. both have chains which are dag13; entry), legalizer can serialize them in arbitrary orders. If it's14; unlucky, it can force libcall #2 before libcall #1 in the above case.15;16;   subc17;    |18;   libcall #219;    |20;   libcall #121;    |22;   sube23;24; However since subc and sube are "glued" together, this ends up being a25; cycle when the scheduler combine subc and sube as a single scheduling26; unit.27;28; The right solution is to fix LegalizeType too chains the libcalls together.29; However, LegalizeType is not processing nodes in order. The fix now is to30; fix subc / sube (and addc / adde) to use physical register dependency instead.31; rdar://1001957632 33define void @t() nounwind {34entry:35  %tmp = load i64, ptr undef, align 436  %tmp5 = udiv i64 %tmp, 3037  %tmp13 = and i64 %tmp5, 6473924464345088038  %tmp16 = sub i64 0, %tmp1339  %tmp19 = and i64 %tmp16, 6340  %tmp20 = urem i64 %tmp19, 341  %tmp22 = and i64 %tmp16, -27234682900475242  store i64 %tmp22, ptr undef, align 443  store i64 %tmp20, ptr undef, align 444  ret void45}46