backport: re PR target/83629 (ICE: in decompose_normal_address, at rtlanal.c:6329 with -O2 -fPIC -frename-registers --param=sched-autopref-queue-depth=nnn)
Backport from mainline 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org> PR target/83629 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b, load_toc_v4_PIC_3c): Wrap const term in CONST RTL. gcc/testsuite/ Backport from mainline 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org> PR target/83629 * gcc.target/powerpc/pr83629.c: New testcase. 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org> PR target/83629 * gcc.target/powerpc/pr83629.c: Require ilp32. From-SVN: r256711
This commit is contained in:
parent
1984fccf0b
commit
8cd9e9f172
|
@ -1,3 +1,12 @@
|
||||||
|
2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
|
||||||
|
|
||||||
|
Backport from mainline
|
||||||
|
2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
|
||||||
|
|
||||||
|
PR target/83629
|
||||||
|
* config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
|
||||||
|
load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
|
||||||
|
|
||||||
2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
|
2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
Backport from mainline
|
Backport from mainline
|
||||||
|
|
|
@ -10662,27 +10662,33 @@
|
||||||
|
|
||||||
(define_insn "load_toc_v4_PIC_2"
|
(define_insn "load_toc_v4_PIC_2"
|
||||||
[(set (match_operand:SI 0 "gpc_reg_operand" "=r")
|
[(set (match_operand:SI 0 "gpc_reg_operand" "=r")
|
||||||
(mem:SI (plus:SI (match_operand:SI 1 "gpc_reg_operand" "b")
|
(mem:SI (plus:SI
|
||||||
(minus:SI (match_operand:SI 2 "immediate_operand" "s")
|
(match_operand:SI 1 "gpc_reg_operand" "b")
|
||||||
(match_operand:SI 3 "immediate_operand" "s")))))]
|
(const
|
||||||
|
(minus:SI (match_operand:SI 2 "immediate_operand" "s")
|
||||||
|
(match_operand:SI 3 "immediate_operand" "s"))))))]
|
||||||
"TARGET_ELF && DEFAULT_ABI == ABI_V4 && flag_pic == 2"
|
"TARGET_ELF && DEFAULT_ABI == ABI_V4 && flag_pic == 2"
|
||||||
"lwz %0,%2-%3(%1)"
|
"lwz %0,%2-%3(%1)"
|
||||||
[(set_attr "type" "load")])
|
[(set_attr "type" "load")])
|
||||||
|
|
||||||
(define_insn "load_toc_v4_PIC_3b"
|
(define_insn "load_toc_v4_PIC_3b"
|
||||||
[(set (match_operand:SI 0 "gpc_reg_operand" "=r")
|
[(set (match_operand:SI 0 "gpc_reg_operand" "=r")
|
||||||
(plus:SI (match_operand:SI 1 "gpc_reg_operand" "b")
|
(plus:SI
|
||||||
(high:SI
|
(match_operand:SI 1 "gpc_reg_operand" "b")
|
||||||
(minus:SI (match_operand:SI 2 "symbol_ref_operand" "s")
|
(high:SI
|
||||||
(match_operand:SI 3 "symbol_ref_operand" "s")))))]
|
(const
|
||||||
|
(minus:SI (match_operand:SI 2 "symbol_ref_operand" "s")
|
||||||
|
(match_operand:SI 3 "symbol_ref_operand" "s"))))))]
|
||||||
"TARGET_ELF && TARGET_SECURE_PLT && DEFAULT_ABI == ABI_V4 && flag_pic"
|
"TARGET_ELF && TARGET_SECURE_PLT && DEFAULT_ABI == ABI_V4 && flag_pic"
|
||||||
"addis %0,%1,%2-%3@ha")
|
"addis %0,%1,%2-%3@ha")
|
||||||
|
|
||||||
(define_insn "load_toc_v4_PIC_3c"
|
(define_insn "load_toc_v4_PIC_3c"
|
||||||
[(set (match_operand:SI 0 "gpc_reg_operand" "=r")
|
[(set (match_operand:SI 0 "gpc_reg_operand" "=r")
|
||||||
(lo_sum:SI (match_operand:SI 1 "gpc_reg_operand" "b")
|
(lo_sum:SI
|
||||||
(minus:SI (match_operand:SI 2 "symbol_ref_operand" "s")
|
(match_operand:SI 1 "gpc_reg_operand" "b")
|
||||||
(match_operand:SI 3 "symbol_ref_operand" "s"))))]
|
(const
|
||||||
|
(minus:SI (match_operand:SI 2 "symbol_ref_operand" "s")
|
||||||
|
(match_operand:SI 3 "symbol_ref_operand" "s")))))]
|
||||||
"TARGET_ELF && TARGET_SECURE_PLT && DEFAULT_ABI == ABI_V4 && flag_pic"
|
"TARGET_ELF && TARGET_SECURE_PLT && DEFAULT_ABI == ABI_V4 && flag_pic"
|
||||||
"addi %0,%1,%2-%3@l")
|
"addi %0,%1,%2-%3@l")
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,16 @@
|
||||||
|
2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
|
||||||
|
|
||||||
|
Backport from mainline
|
||||||
|
2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
|
||||||
|
|
||||||
|
PR target/83629
|
||||||
|
* gcc.target/powerpc/pr83629.c: New testcase.
|
||||||
|
|
||||||
|
2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
|
||||||
|
|
||||||
|
PR target/83629
|
||||||
|
* gcc.target/powerpc/pr83629.c: Require ilp32.
|
||||||
|
|
||||||
2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
|
2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
Backport from mainline
|
Backport from mainline
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
/* { dg-require-effective-target ilp32 } */
|
||||||
|
/* { dg-options "-O2 -fPIC -frename-registers --param=sched-autopref-queue-depth=0 -mcpu=603" } */
|
||||||
|
|
||||||
|
extern void bar (void *);
|
||||||
|
|
||||||
|
void
|
||||||
|
foo (void)
|
||||||
|
{
|
||||||
|
bar ("");
|
||||||
|
}
|
Loading…
Reference in New Issue