File: multidim_invalid_dimension.ll

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (26 lines) | stat: -rw-r--r-- 824 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
; RUN: opt %loadPolly -polly-print-scops -disable-output < %s | FileCheck %s
target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
target triple = "aarch64-unknown-linux-gnueabi"

; Make sure we don't crash trying delinearize the memory access
; CHECK: region: 'bb4 => bb14'
; CHECK-NEXT: Invalid Scop!
define void @f(ptr %arg, i32 %arg1, i32 %arg2, i32 %arg3) {
bb:
  br label %bb4

bb4:
  %tmp = phi i32 [ %arg2, %bb ], [ %tmp12, %bb4 ]
  %tmp5 = icmp sgt i32 %tmp, 0
  %tmp6 = select i1 %tmp5, i32 %tmp, i32 0
  %tmp7 = mul nsw i32 %tmp6, %arg3
  %tmp8 = sext i32 %tmp7 to i64
  %tmp9 = getelementptr inbounds i8, ptr %arg, i64 %tmp8
  %tmp11 = load i32, ptr %tmp9, align 4
  %tmp12 = add nsw i32 %tmp, 1
  %tmp13 = icmp slt i32 %tmp, %arg1
  br i1 %tmp13, label %bb4, label %bb14

bb14:
  ret void
}