mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
31828c19d0
Summary: X86TargetLowering::LowerAsmOperandForConstraint had better support than TargetLowering::LowerAsmOperandForConstraint for arbitrary depth getelementpointers for "i", "n", and "s" extended inline assembly constraints. Hoist its support from the derived class into the base class. Link: https://github.com/ClangBuiltLinux/linux/issues/469 Reviewers: echristo, t.p.northover Reviewed By: t.p.northover Subscribers: t.p.northover, E5ten, kees, jyknight, nemanjai, javed.absar, eraman, hiraditya, jsji, llvm-commits, void, craig.topper, nathanchance, srhines Tags: #llvm Differential Revision: https://reviews.llvm.org/D61560 llvm-svn: 360604
13 lines
387 B
LLVM
13 lines
387 B
LLVM
; RUN: llc < %s -mtriple armv7-linux-gnueabi | FileCheck %s
|
|
|
|
; @foo is a 2d array of i32s, ex.
|
|
; i32 foo [2][2]
|
|
@foo = internal global [2 x [2 x i32]] zeroinitializer, align 4
|
|
|
|
define void @bar() {
|
|
; access foo[1][1]
|
|
; CHECK: @ foo+12
|
|
tail call void asm sideeffect "@ ${0:c}", "i"(i32* getelementptr inbounds ([2 x [2 x i32]], [2 x [2 x i32]]* @foo, i64 0, i64 1, i64 1))
|
|
ret void
|
|
}
|