As mentioned in the PR, during combine rtx_costs can be called sometimes
even on RTL that has not been validated yet and so can contain even operands
that aren't valid in any instruction.
2020-01-21 Jakub Jelinek <jakub@redhat.com>
PR target/93333
* config/riscv/riscv.c (riscv_rtx_costs) <case ZERO_EXTRACT>: Verify
the last two operands are CONST_INT_P before using them as such.
* gcc.c-torture/compile/pr93333.c: New test.
+2020-01-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/93333
+ * config/riscv/riscv.c (riscv_rtx_costs) <case ZERO_EXTRACT>: Verify
+ the last two operands are CONST_INT_P before using them as such.
+
2020-01-21 Richard Sandiford <richard.sandiford@arm.com>
* config/aarch64/aarch64-sve-builtins.def: Use get_typenode_from_name
case ZERO_EXTRACT:
/* This is an SImode shift. */
- if (outer_code == SET && (INTVAL (XEXP (x, 2)) > 0)
+ if (outer_code == SET
+ && CONST_INT_P (XEXP (x, 1))
+ && CONST_INT_P (XEXP (x, 2))
+ && (INTVAL (XEXP (x, 2)) > 0)
&& (INTVAL (XEXP (x, 1)) + INTVAL (XEXP (x, 2)) == 32))
{
*total = COSTS_N_INSNS (SINGLE_SHIFT_COST);
+2020-01-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/93333
+ * gcc.c-torture/compile/pr93333.c: New test.
+
2020-01-21 Sandra Loosemore <sandra@codesourcery.com>
* g++.dg/coroutines/torture/mid-suspend-destruction-0.C: Generalize
--- /dev/null
+/* PR target/93333 */
+
+unsigned
+foo (int b, int c, int d, unsigned long e, int x, int y, int g, int h,
+ unsigned i)
+{
+ e >>= b;
+ i >>= e & 31;
+ return i & 1;
+}