File: pre-process.ll

package info (click to toggle)
llvm-toolchain-15 1%3A15.0.6-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,554,644 kB
  • sloc: cpp: 5,922,452; ansic: 1,012,136; asm: 674,362; python: 191,568; objc: 73,855; f90: 42,327; lisp: 31,913; pascal: 11,973; javascript: 10,144; sh: 9,421; perl: 7,447; ml: 5,527; awk: 3,523; makefile: 2,520; xml: 885; cs: 573; fortran: 567
file content (18 lines) | stat: -rw-r--r-- 985 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
; Test that update_test_checks.py can run pre-processing commands.
; RUN: opt < %s -passes=instsimplify -S | FileCheck %s --check-prefix=CHECK-AS200
; RUN: sed -e 's/addrspace(200)/addrspace(0)/g' -e 's/-A200-P200-G200//g' %s \
; RUN:   | opt -passes=instsimplify -S | FileCheck %s --check-prefix=CHECK-AS0
; Check that multiple pre-processing commands are handled
; RUN: sed 's/addrspace(200)/addrspace(1)/g' %s | sed 's/-A1-P1-G1//g' \
; RUN:   | opt -passes=instsimplify -S | FileCheck %s --check-prefix=CHECK-AS1
; More than two commands should also be fine
; RUN: cat %s | cat | cat | cat | opt < %s -passes=instsimplify -S \
; RUN:   | FileCheck %s --check-prefix=CHECK-AS200-NOOP-PRE-PROCESS

target datalayout = "e-m:e-p200:128:128:128:64-p:64:64-A200-P200-G200"

define i8 addrspace(200)* @test_zerogep_in_different_as(i8 addrspace(200)* %arg) addrspace(200) nounwind {
entry:
  %ret = getelementptr inbounds i8, i8 addrspace(200)* %arg, i64 0
  ret i8 addrspace(200)* %ret
}