aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJoern Rennecke <joern.rennecke@embecosm.com>2012-11-28 13:28:57 +0000
committerJoern Rennecke <amylaar@gcc.gnu.org>2012-11-28 13:28:57 +0000
commitbe74e49e0db90b4e87fde8c20df95bbae97bedca (patch)
treee488681d57627afbc35743e4c99b6553c5d52d45 /gcc
parent9bc8692a422f6fee91af1c1097545ba293b9b47b (diff)
downloadgcc-be74e49e0db90b4e87fde8c20df95bbae97bedca.zip
gcc-be74e49e0db90b4e87fde8c20df95bbae97bedca.tar.gz
gcc-be74e49e0db90b4e87fde8c20df95bbae97bedca.tar.bz2
epiphany.opt (-may-round-for-trunc): New option.
* config/epiphany/epiphany.opt (-may-round-for-trunc): New option. * config/epiphany/epiphany.md (*fix_truncsfsi2_i): Take it into account. From-SVN: r193891
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog3
-rw-r--r--gcc/config/epiphany/epiphany.md5
-rw-r--r--gcc/config/epiphany/epiphany.opt4
3 files changed, 11 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1d4a0c9..5d503fd 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -8,6 +8,9 @@
for misaligned memory operands.
* config/epiphany/predicates.md (misaligned_operand): New predicate.
+ * config/epiphany/epiphany.opt (-may-round-for-trunc): New option.
+ * config/epiphany/epiphany.md (*fix_truncsfsi2_i): Take it into account.
+
2012-11-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/54547
diff --git a/gcc/config/epiphany/epiphany.md b/gcc/config/epiphany/epiphany.md
index f650870..d0cbcc4 100644
--- a/gcc/config/epiphany/epiphany.md
+++ b/gcc/config/epiphany/epiphany.md
@@ -908,7 +908,10 @@
""
"fix %0, %1"
[(set_attr "type" "fp")
- (set_attr "fp_mode" "round_trunc")])
+ (set (attr "fp_mode")
+ (cond [(match_test "TARGET_MAY_ROUND_FOR_TRUNC")
+ (const_string "round_unknown")]
+ (const_string "round_trunc")))])
(define_expand "fixuns_truncsfsi2"
[(set (match_operand:SI 0 "gpr_operand" "")
diff --git a/gcc/config/epiphany/epiphany.opt b/gcc/config/epiphany/epiphany.opt
index 3740182..613bb98 100644
--- a/gcc/config/epiphany/epiphany.opt
+++ b/gcc/config/epiphany/epiphany.opt
@@ -103,6 +103,10 @@ Enum(attr_fp_mode) String(truncate) Value(FP_MODE_ROUND_TRUNC)
EnumValue
Enum(attr_fp_mode) String(int) Value(FP_MODE_INT)
+may-round-for-trunc
+Target Mask(MAY_ROUND_FOR_TRUNC)
+A floatig point to integer truncation may be replaced with rounding to save mode switching
+
mvect-double
Target Mask(VECT_DOUBLE)
Vectorize for double-word operations.