1 ; Test that we take advantage of signext and zeroext annotations.
3 ; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s
5 ; Zero extension of something that is already zero-extended.
6 define void @f1(i32 zeroext %r2, i64 *%r3) {
9 ; CHECK: stg %r2, 0(%r3)
11 %conv = zext i32 %r2 to i64
12 store i64 %conv, i64* %r3
16 ; Sign extension of something that is already sign-extended.
17 define void @f2(i32 signext %r2, i64 *%r3) {
20 ; CHECK: stg %r2, 0(%r3)
22 %conv = sext i32 %r2 to i64
23 store i64 %conv, i64* %r3
27 ; Sign extension of something that is already zero-extended.
28 define void @f3(i32 zeroext %r2, i64 *%r3) {
30 ; CHECK: lgfr [[REGISTER:%r[0-5]+]], %r2
31 ; CHECK: stg [[REGISTER]], 0(%r3)
33 %conv = sext i32 %r2 to i64
34 store i64 %conv, i64* %r3
38 ; Zero extension of something that is already sign-extended.
39 define void @f4(i32 signext %r2, i64 *%r3) {
41 ; CHECK: llgfr [[REGISTER:%r[0-5]+]], %r2
42 ; CHECK: stg [[REGISTER]], 0(%r3)
44 %conv = zext i32 %r2 to i64
45 store i64 %conv, i64* %r3