brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 15f7c25 Raw
33 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 52; Test that the alloc-token pass lowers the intrinsic to a constant token ID.3;4; RUN: opt < %s -passes='alloc-token<mode=typehashpointersplit>' -alloc-token-max=2 -S | FileCheck %s5 6target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32-S128"7target triple = "i386-pc-linux-gnu"8 9declare i32 @llvm.alloc.token.id.i32(metadata)10 11define i32 @test_intrinsic_lowering() {12; CHECK-LABEL: define i32 @test_intrinsic_lowering() {13; CHECK-NEXT:  [[ENTRY:.*:]]14; CHECK-NEXT:    ret i32 015;16entry:17  %token_no_ptr = call i32 @llvm.alloc.token.id.i32(metadata !0)18  ret i32 %token_no_ptr19}20 21define i32 @test_intrinsic_lowering_ptr() {22; CHECK-LABEL: define i32 @test_intrinsic_lowering_ptr() {23; CHECK-NEXT:  [[ENTRY:.*:]]24; CHECK-NEXT:    ret i32 125;26entry:27  %token_with_ptr = call i32 @llvm.alloc.token.id.i32(metadata !1)28  ret i32 %token_with_ptr29}30 31!0 = !{!"NoPointerType", i1 false}32!1 = !{!"PointerType", i1 true}33