2013-05-07 00:17:29 +08:00
|
|
|
; Test constant addresses, unlikely as they are.
|
|
|
|
;
|
|
|
|
; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s
|
|
|
|
|
|
|
|
define void @f1() {
|
2013-07-14 14:24:09 +08:00
|
|
|
; CHECK-LABEL: f1:
|
2013-05-07 00:17:29 +08:00
|
|
|
; CHECK: lb %r0, 0
|
|
|
|
; CHECK: br %r14
|
|
|
|
%ptr = inttoptr i64 0 to i8 *
|
2015-02-28 05:17:42 +08:00
|
|
|
%val = load volatile i8 , i8 *%ptr
|
2013-05-07 00:17:29 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
define void @f2() {
|
2013-07-14 14:24:09 +08:00
|
|
|
; CHECK-LABEL: f2:
|
2013-05-07 00:17:29 +08:00
|
|
|
; CHECK: lb %r0, -524288
|
|
|
|
; CHECK: br %r14
|
|
|
|
%ptr = inttoptr i64 -524288 to i8 *
|
2015-02-28 05:17:42 +08:00
|
|
|
%val = load volatile i8 , i8 *%ptr
|
2013-05-07 00:17:29 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
define void @f3() {
|
2013-07-14 14:24:09 +08:00
|
|
|
; CHECK-LABEL: f3:
|
2013-05-07 00:17:29 +08:00
|
|
|
; CHECK-NOT: lb %r0, -524289
|
|
|
|
; CHECK: br %r14
|
|
|
|
%ptr = inttoptr i64 -524289 to i8 *
|
2015-02-28 05:17:42 +08:00
|
|
|
%val = load volatile i8 , i8 *%ptr
|
2013-05-07 00:17:29 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
define void @f4() {
|
2013-07-14 14:24:09 +08:00
|
|
|
; CHECK-LABEL: f4:
|
2013-05-07 00:17:29 +08:00
|
|
|
; CHECK: lb %r0, 524287
|
|
|
|
; CHECK: br %r14
|
|
|
|
%ptr = inttoptr i64 524287 to i8 *
|
2015-02-28 05:17:42 +08:00
|
|
|
%val = load volatile i8 , i8 *%ptr
|
2013-05-07 00:17:29 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
define void @f5() {
|
2013-07-14 14:24:09 +08:00
|
|
|
; CHECK-LABEL: f5:
|
2013-05-07 00:17:29 +08:00
|
|
|
; CHECK-NOT: lb %r0, 524288
|
|
|
|
; CHECK: br %r14
|
|
|
|
%ptr = inttoptr i64 524288 to i8 *
|
2015-02-28 05:17:42 +08:00
|
|
|
%val = load volatile i8 , i8 *%ptr
|
2013-05-07 00:17:29 +08:00
|
|
|
ret void
|
|
|
|
}
|