SystemZVectorConstantInfo::SystemZVectorConstantInfo(APFloat FPImm) {
IntBits = FPImm.bitcastToAPInt().zextOrSelf(128);
isFP128 = (&FPImm.getSemantics() == &APFloat::IEEEquad());
-
- // Find the smallest splat.
SplatBits = FPImm.bitcastToAPInt();
unsigned Width = SplatBits.getBitWidth();
+ IntBits <<= (SystemZ::VectorBits - Width);
+
+ // Find the smallest splat.
while (Width > 8) {
unsigned HalfSize = Width / 2;
APInt HighValue = SplatBits.lshr(HalfSize).trunc(HalfSize);
-; Test loads of FP constants with VGM.
+; Test loads of FP constants with VGM and VGBM.
;
; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | FileCheck %s
; CHECK: vgmf %v0, 2, 6
ret float 0.125
}
+
+define float @f11() {
+; CHECK-LABEL: f11:
+; CHECK: vgbm %v0, 61440
+ ret float 0xFFFFFFFFE0000000
+}
+
+define double @f12() {
+; CHECK-LABEL: f12:
+; CHECK: vgbm %v0, 61440
+ ret double 0xFFFFFFFF00000000
+}
;
; SZ13-LABEL: constrained_vector_fadd_v3f32:
; SZ13: # %bb.0: # %entry
-; SZ13-NEXT: vgbm %v0, 15
+; SZ13-NEXT: vgbm %v0, 61440
; SZ13-NEXT: vgmf %v2, 1, 1
; SZ13-NEXT: vgmf %v3, 2, 8
; SZ13-NEXT: lzer %f1
;
; SZ13-LABEL: constrained_vector_fsub_v3f32:
; SZ13: # %bb.0: # %entry
-; SZ13-NEXT: vgbm %v2, 15
+; SZ13-NEXT: vgbm %v2, 61440
; SZ13-NEXT: lzer %f1
; SZ13-NEXT: sebr %f2, %f1
; SZ13-NEXT: vgmf %v1, 1, 1
-; SZ13-NEXT: vgbm %v3, 15
-; SZ13-NEXT: vgbm %v0, 15
+; SZ13-NEXT: vgbm %v3, 61440
+; SZ13-NEXT: vgbm %v0, 61440
; SZ13-NEXT: sebr %f3, %f1
; SZ13-NEXT: vgmf %v1, 2, 8
; SZ13-NEXT: sebr %f0, %f1