File: 2011-08-29-SchedCycle.ll

package info (click to toggle)
llvm-toolchain-14 1%3A14.0.6-12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,496,180 kB
  • sloc: cpp: 5,593,972; ansic: 986,872; asm: 585,869; python: 184,223; objc: 72,530; lisp: 31,119; f90: 27,793; javascript: 9,780; pascal: 9,762; sh: 9,482; perl: 7,468; ml: 5,432; awk: 3,523; makefile: 2,538; xml: 953; cs: 573; fortran: 567
file content (45 lines) | stat: -rw-r--r-- 1,321 bytes parent folder | download | duplicates (21)
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
; RUN: llc %s -mtriple=thumbv7-apple-darwin -mcpu=cortex-a8 -o -

; When a i64 sub is expanded to subc + sube.
;   libcall #1
;      \
;       \        subc 
;        \       /  \
;         \     /    \
;          \   /    libcall #2
;           sube
;
; If the libcalls are not serialized (i.e. both have chains which are dag
; entry), legalizer can serialize them in arbitrary orders. If it's
; unlucky, it can force libcall #2 before libcall #1 in the above case.
;
;   subc
;    |
;   libcall #2
;    |
;   libcall #1
;    |
;   sube
;
; However since subc and sube are "glued" together, this ends up being a
; cycle when the scheduler combine subc and sube as a single scheduling
; unit.
;
; The right solution is to fix LegalizeType too chains the libcalls together.
; However, LegalizeType is not processing nodes in order. The fix now is to
; fix subc / sube (and addc / adde) to use physical register dependency instead.
; rdar://10019576

define void @t() nounwind {
entry:
  %tmp = load i64, i64* undef, align 4
  %tmp5 = udiv i64 %tmp, 30
  %tmp13 = and i64 %tmp5, 64739244643450880
  %tmp16 = sub i64 0, %tmp13
  %tmp19 = and i64 %tmp16, 63
  %tmp20 = urem i64 %tmp19, 3
  %tmp22 = and i64 %tmp16, -272346829004752
  store i64 %tmp22, i64* undef, align 4
  store i64 %tmp20, i64* undef, align 4
  ret void
}