1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s
4 define i8 @test(i8 %x) {
7 ; CHECK-NEXT: slgfi %r0, 1
9 ; CHECK-NEXT: afi %r0, -536870912
10 ; CHECK-NEXT: srl %r0, 31
11 ; CHECK-NEXT: ar %r2, %r0
13 %usubo = tail call { i64, i1 } @llvm.usub.with.overflow.i64(i64 undef, i64 1)
14 %ov = extractvalue { i64, i1 } %usubo, 1
15 %ovext = zext i1 %ov to i8
16 %ret = add i8 %x, %ovext
20 ; Function Attrs: nounwind readnone speculatable
21 declare { i64, i1 } @llvm.usub.with.overflow.i64(i64, i64) #0
23 attributes #0 = { nounwind readnone speculatable }