diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2017-09-01 16:24:02 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2017-09-01 16:24:02 +0000 |
commit | 043998b329efeb8efdd2aed58a2e6ee38f6b3fdc (patch) | |
tree | e22910b8f3a983fdb0a0059f7127cfa9e3dffcdd /test/Bitcode | |
parent | 5d292d77f56dfa221128912f8ce694214e6dad9e (diff) |
ModuleSummaryAnalysis: Correctly handle refs from function inline asm to module inline asm.
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
Diffstat (limited to 'test/Bitcode')
-rw-r--r-- | test/Bitcode/thinlto-asm-noimport.ll | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/Bitcode/thinlto-asm-noimport.ll b/test/Bitcode/thinlto-asm-noimport.ll new file mode 100644 index 000000000000..84d2e95cefbc --- /dev/null +++ b/test/Bitcode/thinlto-asm-noimport.ll @@ -0,0 +1,16 @@ +; 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 +} |