aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2016-07-12 21:23:58 +0200
committerUros Bizjak <uros@gcc.gnu.org>2016-07-12 21:23:58 +0200
commit1a58b548f8e59292685497fddf5d58c7af28ea77 (patch)
treea86197c090d4e5f16d4883e067132217f7210eaa
parent0b0a896e7ffdc9237660cedd00b3d1be37e8335c (diff)
downloadgcc-1a58b548f8e59292685497fddf5d58c7af28ea77.zip
gcc-1a58b548f8e59292685497fddf5d58c7af28ea77.tar.gz
gcc-1a58b548f8e59292685497fddf5d58c7af28ea77.tar.bz2
predicates.md (x86_64_immediate_operand): Remove unneeded truncation to DImode.
* config/i386/predicates.md (x86_64_immediate_operand) <case CONST_INT>: Remove unneeded truncation to DImode. <case CONST>: Ditto. (x86_64_zext_immediate_operand) <case CONST>: Ditto. From-SVN: r238259
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/i386/predicates.md8
2 files changed, 10 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b8db663..6cb8da2 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2016-07-12 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/i386/predicates.md (x86_64_immediate_operand)
+ <case CONST_INT>: Remove unneeded truncation to DImode.
+ <case CONST>: Ditto.
+ (x86_64_zext_immediate_operand) <case CONST>: Ditto.
+
2016-07-12 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/71805
diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md
index 6854c37..219674e 100644
--- a/gcc/config/i386/predicates.md
+++ b/gcc/config/i386/predicates.md
@@ -156,7 +156,7 @@
{
case CONST_INT:
{
- HOST_WIDE_INT val = trunc_int_for_mode (INTVAL (op), DImode);
+ HOST_WIDE_INT val = INTVAL (op);
return trunc_int_for_mode (val, SImode) == val;
}
case SYMBOL_REF:
@@ -199,14 +199,13 @@
{
rtx op1 = XEXP (XEXP (op, 0), 0);
rtx op2 = XEXP (XEXP (op, 0), 1);
- HOST_WIDE_INT offset;
if (ix86_cmodel == CM_LARGE)
return false;
if (!CONST_INT_P (op2))
return false;
- offset = trunc_int_for_mode (INTVAL (op2), DImode);
+ HOST_WIDE_INT offset = INTVAL (op2);
if (trunc_int_for_mode (offset, SImode) != offset)
return false;
@@ -306,14 +305,13 @@
{
rtx op1 = XEXP (XEXP (op, 0), 0);
rtx op2 = XEXP (XEXP (op, 0), 1);
- HOST_WIDE_INT offset;
if (ix86_cmodel == CM_LARGE)
return false;
if (!CONST_INT_P (op2))
return false;
- offset = trunc_int_for_mode (INTVAL (op2), DImode);
+ HOST_WIDE_INT offset = INTVAL (op2);
if (trunc_int_for_mode (offset, SImode) != offset)
return false;