File: aggregate_last_undef.ll

package info (click to toggle)
intel-graphics-compiler 1.0.17791.18-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 102,312 kB
  • sloc: cpp: 935,343; lisp: 286,143; ansic: 16,196; python: 3,279; yacc: 2,487; lex: 1,642; pascal: 300; sh: 174; makefile: 27
file content (38 lines) | stat: -rw-r--r-- 1,104 bytes parent folder | download | duplicates (2)
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
;=========================== begin_copyright_notice ============================
;
; Copyright (C) 2022-2023 Intel Corporation
;
; SPDX-License-Identifier: MIT
;
;============================ end_copyright_notice =============================

; COM: Check that aggregate with no register for last element printed
; COM: correctly.

; RUN: llc -march=genx64 -mcpu=Gen9 -print-after=GenXVisaRegAllocWrapper %s \
; RUN:   -o /dev/null 2>&1 | FileCheck %s

target datalayout = "e-p:64:64-p6:32:32-i64:64-n8:16:32:64"
target triple = "genx64-unknown-unknown"

%str = type { i32, i32 }

; CHECK-LABEL: @test(
; CHECK: [v{{[0-9]+}},-] {{%.*}} = insertvalue %str undef, i32 {{%.*}}, 0
define spir_func i32 @test(i32 %a0, i32 %a1) #1 !FuncArgSize !1 !FuncRetSize !2 {
  %s0 = insertvalue %str undef, i32 %a0, 0
  %s1 = insertvalue %str %s0, i32 %a1, 1
  %ret = tail call spir_func i32 @proc(%str %s1)
  ret i32 %ret
}

define internal spir_func i32 @proc(%str %arg) #0 {
  %v = extractvalue %str %arg, 1
  ret i32 %v
}

attributes #0 = { noinline }
attributes #1 = { "CMStackCall" }

!1 = !{i32 2}
!2 = !{i32 1}