brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · 13dca81 Raw
56 lines · plain
1; Test 16-bit inequality comparisons between memory and a constant.2;3; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s4 5; Check the low end of the unsigned 16-bit range.6define double @f1(double %a, double %b, ptr %ptr) {7; CHECK-LABEL: f1:8; CHECK: clhhsi 0(%r2), 09; CHECK-NEXT: blhr %r1410; CHECK: ldr %f0, %f211; CHECK: br %r1412  %val = load i16, ptr %ptr13  %cond = icmp ne i16 %val, 014  %res = select i1 %cond, double %a, double %b15  ret double %res16}17 18; Check the high end of the unsigned 16-bit range.19define double @f2(double %a, double %b, ptr %ptr) {20; CHECK-LABEL: f2:21; CHECK: clhhsi 0(%r2), 6553522; CHECK-NEXT: blhr %r1423; CHECK: ldr %f0, %f224; CHECK: br %r1425  %val = load i16, ptr %ptr26  %cond = icmp ne i16 %val, 6553527  %res = select i1 %cond, double %a, double %b28  ret double %res29}30 31; Check the low end of the signed 16-bit range.32define double @f3(double %a, double %b, ptr %ptr) {33; CHECK-LABEL: f3:34; CHECK: clhhsi 0(%r2), 3276835; CHECK-NEXT: blhr %r1436; CHECK: ldr %f0, %f237; CHECK: br %r1438  %val = load i16, ptr %ptr39  %cond = icmp ne i16 %val, -3276840  %res = select i1 %cond, double %a, double %b41  ret double %res42}43 44; Check the high end of the signed 16-bit range.45define double @f4(double %a, double %b, ptr %ptr) {46; CHECK-LABEL: f4:47; CHECK: clhhsi 0(%r2), 3276748; CHECK-NEXT: blhr %r1449; CHECK: ldr %f0, %f250; CHECK: br %r1451  %val = load i16, ptr %ptr52  %cond = icmp ne i16 %val, 3276753  %res = select i1 %cond, double %a, double %b54  ret double %res55}56