mirror of
https://github.com/RPCS3/llvm.git
synced 2025-03-03 16:18:37 +00:00

If a function contains inline asm and the module-level inline asm contains the definition of a local symbol, prevent the function from being imported in case the function-level inline asm refers to a symbol in the module-level inline asm. Differential Revision: https://reviews.llvm.org/D37370 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312332 91177308-0d34-0410-b5e6-96231b3b80d8
17 lines
401 B
LLVM
17 lines
401 B
LLVM
; REQUIRES: arm-registered-target
|
|
; RUN: opt -module-summary -o %t %s
|
|
; RUN: llvm-bcanalyzer -dump %t | FileCheck %s
|
|
|
|
target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
|
|
target triple = "thumbv7--linux-android"
|
|
|
|
module asm "asm:"
|
|
module asm "bx lr"
|
|
|
|
; NotEligibleToImport
|
|
; CHECK: <PERMODULE {{.*}} op1=16
|
|
define void @f() {
|
|
call void asm sideeffect "bl asm\0A", ""()
|
|
ret void
|
|
}
|