+; Check the low end of the CGIJ range.
+define double @f11(double %a, double %b, i64 %i1) {
+; CHECK-LABEL: f11:
+; CHECK: cgije %r2, -128
+; CHECK: ldr %f0, %f2
+; CHECK: br %r14
+ %cond = icmp eq i64 %i1, -128
+ %res = select i1 %cond, double %a, double %b
+ ret double %res
+}
+
+; Check the next value down, which must use CGHI instead.
+define double @f12(double %a, double %b, i64 %i1) {
+; CHECK-LABEL: f12:
+; CHECK: cghi %r2, -129
+; CHECK-NEXT: je
+; CHECK: ldr %f0, %f2
+; CHECK: br %r14
+ %cond = icmp eq i64 %i1, -129
+ %res = select i1 %cond, double %a, double %b
+ ret double %res
+}
+