File: loop-3.ll

package info (click to toggle)
intel-graphics-compiler2 2.16.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 106,644 kB
  • sloc: cpp: 805,640; lisp: 287,672; ansic: 16,414; python: 3,952; yacc: 2,588; lex: 1,666; pascal: 313; sh: 186; makefile: 35
file content (42 lines) | stat: -rw-r--r-- 1,124 bytes parent folder | download
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
;=========================== begin_copyright_notice ============================
;
; Copyright (C) 2025 Intel Corporation
;
; SPDX-License-Identifier: MIT
;
;============================ end_copyright_notice =============================

target datalayout = "e-p:32:32:32-p1:64:64:64-p2:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:32:32-v96:32:32-v128:32:32-a0:0:32-n8:16:32-S32"
target triple = "dxil-ms-dx"

; RUN: igc_opt --opaque-pointers -S --platformbmg --igc-ocl-merge-allocas %s | FileCheck %s

; Test if lifetime leaking instruction will interact correctly with loops that contain the entirety of the lifetime
; CHECK-NOT: error

define void @test() #0 {
entry:
  %alloca1 = alloca i32
  br label %looppreheader

looppreheader:
  br label %loopheader

loopheader:
  %p2i = ptrtoint ptr %alloca1 to i64
  br i1 false, label %loopbody, label %if.end

loopbody:
  %a = load i32, ptr %alloca1
  store i32 10, ptr %alloca1
  br i1 false, label %exit, label %if.end

if.end:
  %b = load i32, ptr %alloca1
  br label %loopheader

exit:
  ret void
}

attributes #0 = { nounwind readnone }