File: early-ifcvt-crash.ll

package info (click to toggle)
llvm-toolchain-15 1%3A15.0.6-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,554,644 kB
  • sloc: cpp: 5,922,452; ansic: 1,012,136; asm: 674,362; python: 191,568; objc: 73,855; f90: 42,327; lisp: 31,913; pascal: 11,973; javascript: 10,144; sh: 9,421; perl: 7,447; ml: 5,527; awk: 3,523; makefile: 2,520; xml: 885; cs: 573; fortran: 567
file content (34 lines) | stat: -rw-r--r-- 1,069 bytes parent folder | download | duplicates (10)
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
; RUN: llc < %s -x86-early-ifcvt -verify-machineinstrs
; RUN: llc < %s -x86-early-ifcvt -stress-early-ifcvt -verify-machineinstrs
; CPU without a scheduling model:
; RUN: llc < %s -x86-early-ifcvt -mcpu=k8 -verify-machineinstrs
;
; Run these tests with and without -stress-early-ifcvt to exercise heuristics.
;
target triple = "x86_64-apple-macosx10.8.0"

; MachineTraceMetrics::Ensemble::addLiveIns crashes because the first operand
; on an inline asm instruction is not a vreg def.
; <rdar://problem/12472811>
define void @f1() nounwind {
entry:
  br i1 undef, label %if.then6.i, label %if.end.i

if.then6.i:
  br label %if.end.i

if.end.i:
  br i1 undef, label %if.end25.i, label %if.else17.i

if.else17.i:
  %shl24.i = shl i32 undef, undef
  br label %if.end25.i

if.end25.i:
  %storemerge31.i = phi i32 [ %shl24.i, %if.else17.i ], [ 0, %if.end.i ]
  store i32 %storemerge31.i, ptr undef, align 4
  %0 = tail call i32 asm sideeffect "", "=r,r,i,i"(i32 undef, i32 15, i32 1) nounwind
  %conv = trunc i32 %0 to i8
  store i8 %conv, ptr undef, align 1
  unreachable
}