File: dagcombine-tokenfactor-limit-crash.ll

package info (click to toggle)
llvm-toolchain-17 1%3A17.0.6-22
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,799,624 kB
  • sloc: cpp: 6,428,607; ansic: 1,383,196; asm: 793,408; python: 223,504; objc: 75,364; f90: 60,502; lisp: 33,869; pascal: 15,282; sh: 9,684; perl: 7,453; ml: 4,937; awk: 3,523; makefile: 2,889; javascript: 2,149; xml: 888; fortran: 619; cs: 573
file content (59 lines) | stat: -rw-r--r-- 1,984 bytes parent folder | download | duplicates (13)
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
48
49
50
51
52
53
54
55
56
57
58
59
; RUN: llc %s -combiner-tokenfactor-inline-limit=5 -o - | FileCheck %s

target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.snork = type { i8 }
%struct.wombat = type { [15 x i32] }

; CHECK:          pushq   %rbx
; CHECK-NEXT:     andq    $-32, %rsp
; CHECK-NEXT:     subq    $66144, %rsp            # imm = 0x10260
; CHECK-NEXT:     .cfi_offset %rbx, -24
; CHECK-NEXT:     movabsq $-868076584853899022, %rax # imm = 0xF3F3F8F201F2F8F2
; CHECK-NEXT:     movq    %rax, (%rsp)
; CHECK-NEXT:     movb    $-13, 8263(%rsp)
; CHECK-NEXT:     movq    %rdi, %rbx
; CHECK-NEXT:     callq   hoge
; CHECK-NEXT:     movq    %rbx, %rdi
; CHECK-NEXT:     callq   hoge
; CHECK-NEXT:     callq   hoge
; CHECK-NEXT:     callq   hoge
; CHECK-NEXT:     callq   eggs
; CHECK-NEXT:     callq   hoge
; CHECK-NEXT:     movq    %rbx, %rax
; CHECK-NEXT:     leaq    -8(%rbp), %rsp
; CHECK-NEXT:     popq    %rbx
; CHECK-NEXT:     popq    %rbp
; CHECK-NEXT:    .cfi_def_cfa %rsp, 8
; CHECK-NEXT:    retq
define void @spam(ptr noalias sret(%struct.snork) %arg, ptr %arg2) {
bb:
  %tmp = alloca i8, i64 66112, align 32
  %tmp7 = ptrtoint ptr %tmp to i64
  %tmp914 = inttoptr i64 undef to ptr
  %tmp915 = inttoptr i64 undef to ptr
  %tmp916 = inttoptr i64 undef to ptr
  %tmp917 = inttoptr i64 undef to ptr
  %tmp918 = inttoptr i64 undef to ptr
  %tmp921 = inttoptr i64 undef to ptr
  %tmp2055 = inttoptr i64 %tmp7 to ptr
  store i64 -868076584853899022, ptr %tmp2055, align 1
  %tmp2056 = add i64 %tmp7, 8263
  %tmp2057 = inttoptr i64 %tmp2056 to ptr
  store i8 -13, ptr %tmp2057, align 1
  br label %bb2058

bb2058:                                           ; preds = %bb
  call void @hoge(ptr %arg)
  call void @hoge(ptr %arg)
  call void @hoge(ptr %tmp915)
  call void @hoge(ptr %tmp916)
  call void @eggs(ptr %tmp918, ptr %tmp914, ptr %tmp917)
  call void @hoge(ptr %tmp921)
  ret void
}

declare void @hoge(ptr)

declare void @eggs(ptr, ptr, ptr)