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-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"7target triple = "x86_64-unknown-linux-gnu"8 9declare i64 @llvm.alloc.token.id.i64(metadata)10 11define i64 @test_intrinsic_lowering() {12; CHECK-LABEL: define i64 @test_intrinsic_lowering() {13; CHECK-NEXT: [[ENTRY:.*:]]14; CHECK-NEXT: ret i64 015;16entry:17 %token_no_ptr = call i64 @llvm.alloc.token.id.i64(metadata !0)18 ret i64 %token_no_ptr19}20 21define i64 @test_intrinsic_lowering_ptr() {22; CHECK-LABEL: define i64 @test_intrinsic_lowering_ptr() {23; CHECK-NEXT: [[ENTRY:.*:]]24; CHECK-NEXT: ret i64 125;26entry:27 %token_with_ptr = call i64 @llvm.alloc.token.id.i64(metadata !1)28 ret i64 %token_with_ptr29}30 31!0 = !{!"NoPointerType", i1 false}32!1 = !{!"PointerType", i1 true}33