File: single-element-vector-optimization.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 (31 lines) | stat: -rw-r--r-- 1,149 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
;=========================== begin_copyright_notice ============================
;
; Copyright (C) 2022 Intel Corporation
;
; SPDX-License-Identifier: MIT
;
;============================ end_copyright_notice =============================

; This test checks that prologue optimizations in GenXFuncBaling pass does not produce GEPs when
; folding bitcasts in global store/load instructions operating with SEVs.

; RUN: %opt %use_old_pass_manager% -GenXFuncBaling -march=genx64 -mcpu=Gen9 -mtriple=spir64-unknown-unknown -S < %s | FileCheck %s

; CHECK-NOT: getelementptr

@sevgv = internal global <1 x i32> undef, align 4 #0


define dllexport spir_kernel void @test() local_unnamed_addr #1 {
entry:
  %gload.i = load volatile <1 x i32>, <1 x i32>* @sevgv
  %sev.cast.1 = bitcast <1 x i32> %gload.i to i32
  %add.i = add i32 %sev.cast.1, 1
  %sev.cast.2 = bitcast i32 %add.i to <1 x i32>
  store volatile <1 x i32> %sev.cast.2, <1 x i32>* @sevgv
  ret void
}

attributes #0 = { "VCByteOffset"="0" "VCGlobalVariable" "VCSingleElementVector"="0" "VCVolatile" "genx_byte_offset"="0" "genx_volatile" }
attributes #1 = { noinline nounwind "CMGenxMain" }