brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · ec83c67 Raw
51 lines · plain
1; RUN: llc -verify-machineinstrs < %s | FileCheck %s -check-prefix=STATIC2; RUN: llc -verify-machineinstrs < %s -relocation-model=static | FileCheck %s -check-prefix=STATIC3; RUN: llc -verify-machineinstrs < %s -relocation-model=pic -mtriple=powerpc-unknown-linux-gnu | FileCheck %s -check-prefix=PIC4; RUN: llc -verify-machineinstrs < %s -relocation-model=pic -mtriple=powerpc-unknown-linux | FileCheck %s -check-prefix=PICELF5; RUN: llc -verify-machineinstrs < %s -relocation-model=pic -mtriple=powerpc64-unknown-linux-gnu | FileCheck %s -check-prefix=PIC646 7;;; KB: These two tests currently cause an assertion. It seems as though we cannot have a non DSOLocal symbol with dynamic-no-pic.8;;;     I need to ask Sean about this.9;;; RUN-NOT: llc -verify-machineinstrs < %s -relocation-model=dynamic-no-pic -mtriple=powerpc-unknown-linux-gnu | FileCheck %s -check-prefix=DYNAMIC10;;; RUN-NOT: llc -verify-machineinstrs < %s -relocation-model=dynamic-no-pic -mtriple=powerpc64-unknown-linux-gnu | FileCheck %s -check-prefix=DYNAMIC6411; PR448212target 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:128:128"13target triple = "powerpc-unknown-linux-gnu"14 15define i32 @foo(i64 %x) nounwind {16entry:17; STATIC: foo:18; STATIC: bl exact_log219; STATIC: blr20 21; PIC: foo:22; PIC: bl exact_log2@PLT23; PIC: blr24 25; PICELF: foo:26; PICELF: bl exact_log2@PLT27; PICELF: blr28 29; PIC64: foo:30; PIC64: bl exact_log231; PIC64: blr32 33; DYNAMIC: foo:34; DYNAMIC: bl exact_log2@PLT35; DYNAMIC: blr36 37; DYNAMIC64: foo:38; DYNAMIC64: bl exact_log2@PPLT39; DYNAMIC64: blr40 41        %A = call i32 @exact_log2(i64 %x) nounwind42	ret i32 %A43}44 45define available_externally i32 @exact_log2(i64 %x) nounwind {46entry:47	ret i32 4248}49 50 51