--- /dev/null
+/* PR tree-optimization/112887 */
+/* { dg-do compile } */
+/* { dg-options "-O2 --param=l1-cache-line-size=0x20000000" } */
+
+void bar (long);
+long c;
+struct S { long a, b; } s;
+
+void
+foo (void)
+{
+ bar (c ? s.a : s.b);
+}
hoist_adjacent_loads (basic_block bb0, basic_block bb1,
basic_block bb2, basic_block bb3)
{
- int param_align = param_l1_cache_line_size;
- unsigned param_align_bits = (unsigned) (param_align * BITS_PER_UNIT);
+ unsigned HOST_WIDE_INT param_align = param_l1_cache_line_size;
+ unsigned HOST_WIDE_INT param_align_bits = param_align * BITS_PER_UNIT;
gphi_iterator gsi;
/* Walk the phis in bb3 looking for an opportunity. We are looking
gimple *def1, *def2;
tree arg1, arg2, ref1, ref2, field1, field2;
tree tree_offset1, tree_offset2, tree_size2, next;
- int offset1, offset2, size2;
- unsigned align1;
+ unsigned HOST_WIDE_INT offset1, offset2, size2, align1;
gimple_stmt_iterator gsi2;
basic_block bb_for_def1, bb_for_def2;