1 ; Test proper extension of 8-bit/16-bit cmpxchg.
3 ; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s
9 ; CHECK: llgcr %r2, [[RES:%r[0-9]+]]
12 define zeroext i8 @f1(i8* nocapture, i8 zeroext, i8 zeroext) {
13 %cx = cmpxchg i8* %0, i8 %1, i8 %2 seq_cst seq_cst
14 %res = extractvalue { i8, i1 } %cx, 0
22 ; CHECK: llghr %r2, [[RES:%r[0-9]+]]
25 define zeroext i16 @f2(i16* nocapture, i16 zeroext, i16 zeroext) {
26 %cx = cmpxchg i16* %0, i16 %1, i16 %2 seq_cst seq_cst
27 %res = extractvalue { i16, i1 } %cx, 0
35 ; CHECK: lgbr %r2, [[RES:%r[0-9]+]]
38 define signext i8 @f3(i8* nocapture, i8 signext, i8 signext) {
39 %cx = cmpxchg i8* %0, i8 %1, i8 %2 seq_cst seq_cst
40 %res = extractvalue { i8, i1 } %cx, 0
48 ; CHECK: lghr %r2, [[RES:%r[0-9]+]]
51 define signext i16 @f4(i16* nocapture, i16 signext, i16 signext) {
52 %cx = cmpxchg i16* %0, i16 %1, i16 %2 seq_cst seq_cst
53 %res = extractvalue { i16, i1 } %cx, 0