mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-10 14:12:11 +00:00
[WebAssembly] Add tests for negative offsets with global variable addresses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258693 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6f7efe6314
commit
b0bd82d57a
@ -43,3 +43,21 @@ define i32* @test2() {
|
||||
define i32* @test3() {
|
||||
ret i32* getelementptr ([50 x i32], [50 x i32]* @y, i32 0, i32 0)
|
||||
}
|
||||
|
||||
; Test negative offsets.
|
||||
|
||||
; CHECK-LABEL: test4:
|
||||
; CHECK-NEXT: .result i32{{$}}
|
||||
; CHECK-NEXT: i32.const $push0=, x-188{{$}}
|
||||
; CHECK=NEXT: return $pop0{{$}}
|
||||
define i32* @test4() {
|
||||
ret i32* getelementptr ([0 x i32], [0 x i32]* @x, i32 0, i32 -47)
|
||||
}
|
||||
|
||||
; CHECK-LABEL: test5:
|
||||
; CHECK-NEXT: .result i32{{$}}
|
||||
; CHECK-NEXT: i32.const $push0=, y-188{{$}}
|
||||
; CHECK=NEXT: return $pop0{{$}}
|
||||
define i32* @test5() {
|
||||
ret i32* getelementptr ([50 x i32], [50 x i32]* @y, i32 0, i32 -47)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user