1 ; Test integer negation.
3 ; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s
5 ; Test i32->i32 negation.
6 define i32 @f1(i32 %val) {
10 %neg = sub i32 0, %val
14 ; Test i32->i64 negation.
15 define i64 @f2(i32 %val) {
17 ; CHECK: lcgfr %r2, %r2
19 %ext = sext i32 %val to i64
20 %neg = sub i64 0, %ext
24 ; Test i32->i64 negation that uses an "in-register" form of sign extension.
25 define i64 @f3(i64 %val) {
27 ; CHECK: lcgfr %r2, %r2
29 %trunc = trunc i64 %val to i32
30 %ext = sext i32 %trunc to i64
31 %neg = sub i64 0, %ext
36 define i64 @f4(i64 %val) {
38 ; CHECK: lcgr %r2, %r2
40 %neg = sub i64 0, %val