+2017-01-17 Alan Modra <amodra@gmail.com>
+
+ PR target/79066
+ * config/rs6000/rs6000.md (elf_high, elf_low): Disable when pic.
+ * config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Don't allow
+ symbolic stack limit when pic.
+
2017-01-16 Martin Sebor <msebor@redhat.com>
PR tree-optimization/78608
}
else if (GET_CODE (stack_limit_rtx) == SYMBOL_REF
&& TARGET_32BIT
- && DEFAULT_ABI == ABI_V4)
+ && DEFAULT_ABI == ABI_V4
+ && !flag_pic)
{
rtx toload = gen_rtx_CONST (VOIDmode,
gen_rtx_PLUS (Pmode,
(define_insn "elf_high"
[(set (match_operand:SI 0 "gpc_reg_operand" "=b*r")
(high:SI (match_operand 1 "" "")))]
- "TARGET_ELF && ! TARGET_64BIT"
+ "TARGET_ELF && !TARGET_64BIT && !flag_pic"
"lis %0,%1@ha")
(define_insn "elf_low"
[(set (match_operand:SI 0 "gpc_reg_operand" "=r")
(lo_sum:SI (match_operand:SI 1 "gpc_reg_operand" "b")
(match_operand 2 "" "")))]
- "TARGET_ELF && ! TARGET_64BIT"
+ "TARGET_ELF && !TARGET_64BIT && !flag_pic"
"la %0,%2@l(%1)")
\f
;; Call and call_value insns
+2017-01-17 Alan Modra <amodra@gmail.com>
+
+ * gcc.target/powerpc/pr79066.c: New.
+
2017-01-16 Jeff Law <law@redhat.com>
PR tree-optimization/33562
--- /dev/null
+/* { dg-do compile { target { fpic && ilp32 } } } */
+/* { dg-options "-O2 -fpic" } */
+/* { dg-final { scan-assembler-not "lis.*@ha" } } */
+
+union U { double x; int i[2]; };
+
+double
+foo (double x)
+{
+ union U v;
+ v.i[0] = 0x7ff00000;
+ v.i[1] = 0;
+ return x / v.x;
+}