Andreas,
This patch ensures that INTVAL is only used on a CONST_INT in define_expands
addptrdi3 and addptrsi3. I ran into this issue when building gcc for target s390
with --enable-checking=yes,rtl.
Finished s390 build with patch, and committed as trivial.
Thanks,
- Tom
2014-06-04 Tom de Vries <t...@codesourcery.com>
* config/s390/s390.md ("addptrdi3", "addptrsi3"): Use INTVAL only on
CONST_INT.
diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md
index b17c1fa..5fdbdbe 100644
--- a/gcc/config/s390/s390.md
+++ b/gcc/config/s390/s390.md
@@ -5045,10 +5045,10 @@
(match_operand:DI 2 "nonmemory_operand" "")))]
"TARGET_64BIT"
{
- HOST_WIDE_INT c = INTVAL (operands[2]);
-
if (GET_CODE (operands[2]) == CONST_INT)
{
+ HOST_WIDE_INT c = INTVAL (operands[2]);
+
if (!CONST_OK_FOR_CONSTRAINT_P (c, 'K', "K")
&& !CONST_OK_FOR_CONSTRAINT_P (c, 'O', "Os"))
{
@@ -5071,10 +5071,10 @@
(use (const_int 0))])]
"!TARGET_64BIT"
{
- HOST_WIDE_INT c = INTVAL (operands[2]);
-
if (GET_CODE (operands[2]) == CONST_INT)
{
+ HOST_WIDE_INT c = INTVAL (operands[2]);
+
if (!CONST_OK_FOR_CONSTRAINT_P (c, 'K', "K")
&& !CONST_OK_FOR_CONSTRAINT_P (c, 'O', "Os"))
{
--
1.9.1