File: type_mismatch.ll

package info (click to toggle)
llvm-toolchain-3.8 1%3A3.8.1-24
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 379,280 kB
  • ctags: 388,501
  • sloc: cpp: 2,309,705; ansic: 477,070; objc: 100,918; asm: 97,974; python: 95,911; sh: 18,634; makefile: 7,294; perl: 5,584; ml: 5,460; pascal: 4,661; lisp: 2,548; xml: 686; cs: 350; php: 212; csh: 117
file content (29 lines) | stat: -rw-r--r-- 896 bytes parent folder | download | duplicates (15)
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
; RUN: opt < %s -analyze -delinearize
; REQUIRES: asserts

; Test that SCEV divide code doesn't crash when attempting to create a SCEV
; with operands of different types. In this case, the visitAddRecExpr
; function tries to create an AddRec where the start and step are different
; types.

target datalayout = "e-m:e-p:32:32-i64:64-a:0-v32:32-n16:32"

define fastcc void @test() {
entry:
  %0 = load i16, i16* undef, align 2
  %conv21 = zext i16 %0 to i32
  br label %for.cond7.preheader

for.cond7.preheader:
  %p1.022 = phi i8* [ undef, %entry ], [ %add.ptr, %for.end ]
  br label %for.body11

for.body11:
  %arrayidx.phi = phi i8* [ %p1.022, %for.cond7.preheader ], [ undef, %for.body11 ]
  store i8 undef, i8* %arrayidx.phi, align 1
  br i1 undef, label %for.body11, label %for.end

for.end:
  %add.ptr = getelementptr inbounds i8, i8* %p1.022, i32 %conv21
  br label %for.cond7.preheader
}