{
rtx new_rtx = replace_rtx (SUBREG_REG (x), from, to, all_regs);
- if (CONST_INT_P (new_rtx))
+ if (CONST_SCALAR_INT_P (new_rtx))
{
x = simplify_subreg (GET_MODE (x), new_rtx,
GET_MODE (SUBREG_REG (x)),
{
rtx new_rtx = replace_rtx (XEXP (x, 0), from, to, all_regs);
- if (CONST_INT_P (new_rtx))
+ if (CONST_SCALAR_INT_P (new_rtx))
{
x = simplify_unary_operation (ZERO_EXTEND, GET_MODE (x),
new_rtx, GET_MODE (XEXP (x, 0)));
--- /dev/null
+/* PR rtl-optimization/105333 */
+/* { dg-do compile { target int128 } } */
+/* { dg-options "-Og -fno-tree-coalesce-vars -fno-tree-fre" } */
+
+int g;
+short s;
+
+static inline unsigned short
+bar (short a, __int128 b)
+{
+ b ^= (unsigned long) -a;
+ __builtin_strncpy ((void *) &s, (void *) &a, 1);
+ b *= 14;
+ return b;
+}
+
+void
+foo (void)
+{
+ g *= (__int128) bar (1, 1);
+}