File: attribute.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 (25 lines) | stat: -rw-r--r-- 1,170 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
;=========================== begin_copyright_notice ============================
;
; Copyright (C) 2021-2023 Intel Corporation
;
; SPDX-License-Identifier: MIT
;
;============================ end_copyright_notice =============================

; RUN: %opt %use_old_pass_manager% -GenXPrintfLegalization -march=genx64 -mcpu=Gen9 -S < %s | FileCheck %s

@str = internal unnamed_addr constant [5 x i8] c"text\00", align 1 #0
; CHECK-DAG: @str = internal constant [5 x i8] c"text\00", align 1 #[[ORIG_ATTR:[0-9]+]]
; CHECK-DAG: @str.indexed = internal constant [5 x i8] c"text\00", align 1 #[[CLONE_ATTR:[0-9]+]]

declare i32 @llvm.vc.internal.print.format.index.p0i8(i8*)

define dllexport void @str_vs_ptr(<1 x i64> %addr) {
  %legal.use = tail call i32 @llvm.vc.internal.print.format.index.p0i8(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
  %illegal.use = ptrtoint [5 x i8]* @str to i64
  ret void
}

attributes #0 = { "some-attr-0" "some-attr-1" "VCPrintfStringVariable" "some-attr-2" }
; CHECK-DAG: attributes #[[ORIG_ATTR]] = { "some-attr-0" "some-attr-1" "some-attr-2" }
; CHECK-DAG: attributes #[[CLONE_ATTR]] = { "VCPrintfStringVariable" }