(define_insn_and_split "vsx_stxvd2x4_le_const_<mode>"
[(set (match_operand:VSX_W 0 "memory_operand" "=Z")
- (match_operand:VSX_W 1 "immediate_operand" "W"))]
+ (match_operand:VSX_W 1 "immediate_operand" "W"))
+ (clobber (match_scratch:VSX_W 2 "=wa"))]
"!BYTES_BIG_ENDIAN
&& VECTOR_MEM_VSX_P (<MODE>mode)
&& !TARGET_P9_VECTOR
- && const_vec_duplicate_p (operands[1])
- && can_create_pseudo_p ()"
+ && !altivec_indexed_or_indirect_operand (operands[0], <MODE>mode)
+ && const_vec_duplicate_p (operands[1])"
"#"
"&& 1"
[(set (match_dup 2)
{
/* Here all the constants must be loaded without memory. */
gcc_assert (easy_altivec_constant (operands[1], <MODE>mode));
- operands[2] = gen_reg_rtx (<MODE>mode);
+ if (GET_CODE (operands[2]) == SCRATCH)
+ operands[2] = gen_reg_rtx (<MODE>mode);
}
[(set_attr "type" "vecstore")
(set_attr "length" "8")])
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-mdejagnu-cpu=power8 -Os -fno-forward-propagate -ftrivial-auto-var-init=zero" } */
+/* { dg-require-effective-target dfp } */
+
+/* Verify we do not ICE on the tests below. */
+
+/* { dg-final { scan-assembler-not "rldicr" { target { le } } } } */
+/* { dg-final { scan-assembler-not "stxvd2x" { target { le } } } } */
+
+union U128
+{
+ _Decimal128 d;
+ unsigned long long int u[2];
+};
+
+union U128
+foo ()
+{
+ volatile union U128 u128;
+ u128.d = 0.9999999999999999999999999999999999e+39DL;
+ return u128;
+}