mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
fa94d17420
Summary: An inline asm call can result in an immediate after inlining. Therefore emit a diagnostic here if constraint requires an immediate but one isn't supplied. Reviewers: joerg, mgorny, efriedma, rsmith Reviewed By: joerg Subscribers: asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, s.egerton, MaskRay, jyknight, dylanmckay, javed.absar, fedor.sergeev, jrtc27, Jim, krytarowski, eraman, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60942 llvm-svn: 367750
18 lines
753 B
LLVM
18 lines
753 B
LLVM
; RUN: not llc -mtriple=x86_64-unknown-unknown -no-integrated-as < %s 2>&1 | FileCheck %s
|
|
|
|
%struct.s = type { i32, i32 }
|
|
|
|
@pr40890.s = internal global %struct.s zeroinitializer, align 4
|
|
|
|
; CHECK: error: invalid operand for inline asm constraint 'e'
|
|
; CHECK: error: invalid operand for inline asm constraint 'e'
|
|
|
|
define void @pr40890() {
|
|
entry:
|
|
; This pointer cannot be used as an integer constant expression.
|
|
tail call void asm sideeffect "\0A#define GLOBAL_A abcd$0\0A", "e,~{dirflag},~{fpsr},~{flags}"(i32* getelementptr inbounds (%struct.s, %struct.s* @pr40890.s, i64 0, i32 0))
|
|
; Floating-point is also not okay.
|
|
tail call void asm sideeffect "\0A#define PI abcd$0\0A", "e,~{dirflag},~{fpsr},~{flags}"(float 0x40091EB860000000)
|
|
ret void
|
|
}
|