File: insert-big.ll

package info (click to toggle)
llvm-toolchain-21 1%3A21.1.6-2
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 2,245,044 kB
  • sloc: cpp: 7,619,726; ansic: 1,434,018; asm: 1,058,748; python: 252,740; f90: 94,671; objc: 70,685; lisp: 42,813; pascal: 18,401; sh: 8,601; ml: 5,111; perl: 4,720; makefile: 3,666; awk: 3,523; javascript: 2,409; xml: 892; fortran: 770
file content (47 lines) | stat: -rw-r--r-- 1,663 bytes parent folder | download | duplicates (3)
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
; Check that llc does not abort, which happened due to incorrect MIR.
; RUN: llc -O2 -mtriple=hexagon -insert-max-ifmap=1 < %s
; RUN: llc -O2 -mtriple=hexagon -insert-max-ifmap=2 < %s
; RUN: llc -O2 -mtriple=hexagon -insert-max-ifmap=3 < %s
; RUN: llc -O2 -mtriple=hexagon -insert-max-ifmap=4 < %s
; RUN: llc -O2 -mtriple=hexagon -insert-max-ifmap=5 < %s

; Look for this symptom, in case llc does not check invalid IR.
; CHECK-NOT: insert(%14,%5,#5,#5)

; RUN: llc -O2 -mtriple=hexagon -insert-max-ifmap=1 -debug-only=hexinsert -stop-after hexinsert < %s 2>&1 | FileCheck %s
; RUN: llc -O2 -mtriple=hexagon -insert-max-ifmap=2 -debug-only=hexinsert -stop-after hexinsert < %s 2>&1 | FileCheck %s
; RUN: llc -O2 -mtriple=hexagon -insert-max-ifmap=3 -debug-only=hexinsert -stop-after hexinsert < %s 2>&1 | FileCheck %s
; RUN: llc -O2 -mtriple=hexagon -insert-max-ifmap=4 -debug-only=hexinsert -stop-after hexinsert < %s 2>&1 | FileCheck %s
; RUN: llc -O2 -mtriple=hexagon -insert-max-ifmap=5 -debug-only=hexinsert -stop-after hexinsert < %s 2>&1 | FileCheck %s

; REQUIRES: asserts

define i32 @f(i32 %0, i32 %1, i32 %2) {
entry:
  switch i32 %0, label %common.ret1 [
    i32 8907, label %3
    i32 4115, label %6
  ]

common.ret1:
  %common.ret1.op = phi i32 [ %5, %3 ], [ %526, %6 ], [ 0, %entry ]
  ret i32 %common.ret1.op

3:
  %4 = shl i32 %2, 5
  %5 = and i32 %4, 992
  br label %common.ret1

6:
  %7 = shl i32 %0, 10
  %8 = and i32 %7, 7168
  %9 = shl i32 %0, 5
  %10 = and i32 %9, 992
  %11 = or i32 %10, %8
  %12 = and i32 %0, 1
  %13 = or i32 %11, %12
  %14 = shl i32 %1, 1
  %15 = and i32 %14, 2031616
  %526 = or i32 %13, %15
  br label %common.ret1
}