diff options
| author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-03-18 16:32:12 +0000 |
|---|---|---|
| committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-03-18 16:32:12 +0000 |
| commit | 8cccd283d23f26d115a54fdabb9221d226c66073 (patch) | |
| tree | 96da835e1fcc5008f6951eb668fa2713473ba0ff | |
| parent | 27848d5f59e24e2486e5242593d730623f44ba4e (diff) | |
| download | ppe42-gcc-8cccd283d23f26d115a54fdabb9221d226c66073.tar.gz ppe42-gcc-8cccd283d23f26d115a54fdabb9221d226c66073.zip | |
* i386.md (cvtts?2si peep2): New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64537 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/ChangeLog | 4 | ||||
| -rw-r--r-- | gcc/config/i386/i386.md | 40 | ||||
| -rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
| -rw-r--r-- | gcc/testsuite/gcc.dg/i386-cvt-1.c | 12 |
4 files changed, 60 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index dadb5d81475..46daf2702b6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +Tue Mar 18 13:15:08 CET 2003 Jan Hubicka <jh@suse.cz> + + * i386.md (cvtts?2si peep2): New. + 2003-03-18 Kazu Hirata <kazu@cs.umass.edu> * config/h8300/h8300.md (*iorsi3_two_qi_zext): New. diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 39b8f6ac12c..22b6a14a3b1 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -4516,6 +4516,16 @@ (set (match_dup 0) (fix:DI (match_dup 2)))] "") +;; Avoid vector decoded form of the instruction. +(define_peephole2 + [(match_scratch:SF 2 "x") + (set (match_operand:DI 0 "register_operand" "") + (fix:DI (match_operand:SF 1 "memory_operand" "")))] + "TARGET_K8 && !optimize_size" + [(set (match_dup 2) (match_dup 1)) + (set (match_dup 0) (fix:DI (match_dup 2)))] + "") + (define_insn "fix_truncdfdi_sse" [(set (match_operand:DI 0 "register_operand" "=r,r") (fix:DI (match_operand:DF 1 "nonimmediate_operand" "Y,Ym")))] @@ -4534,6 +4544,16 @@ (set (match_dup 0) (fix:DI (match_dup 2)))] "") +;; Avoid vector decoded form of the instruction. +(define_peephole2 + [(match_scratch:DF 2 "Y") + (set (match_operand:DI 0 "register_operand" "") + (fix:DI (match_operand:DF 1 "memory_operand" "")))] + "TARGET_K8 && !optimize_size" + [(set (match_dup 2) (match_dup 1)) + (set (match_dup 0) (fix:DI (match_dup 2)))] + "") + ;; Signed conversion to SImode. (define_expand "fix_truncxfsi2" @@ -4647,6 +4667,16 @@ (set (match_dup 0) (fix:SI (match_dup 2)))] "") +;; Avoid vector decoded form of the instruction. +(define_peephole2 + [(match_scratch:SF 2 "x") + (set (match_operand:SI 0 "register_operand" "") + (fix:SI (match_operand:SF 1 "memory_operand" "")))] + "TARGET_K8 && !optimize_size" + [(set (match_dup 2) (match_dup 1)) + (set (match_dup 0) (fix:SI (match_dup 2)))] + "") + (define_insn "fix_truncdfsi_sse" [(set (match_operand:SI 0 "register_operand" "=r,r") (fix:SI (match_operand:DF 1 "nonimmediate_operand" "Y,Ym")))] @@ -4659,6 +4689,16 @@ (define_peephole2 [(match_scratch:DF 2 "Y") (set (match_operand:SI 0 "register_operand" "") + (fix:SI (match_operand:DF 1 "memory_operand" "")))] + "TARGET_K8 && !optimize_size" + [(set (match_dup 2) (match_dup 1)) + (set (match_dup 0) (fix:SI (match_dup 2)))] + "") + +;; Avoid vector decoded form of the instruction. +(define_peephole2 + [(match_scratch:DF 2 "Y") + (set (match_operand:SI 0 "register_operand" "") (fix:SI (match_operand:DF 1 "nonimmediate_operand" "")))] "TARGET_K8 && !optimize_size" [(set (match_dup 2) (match_dup 1)) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 54ffa10c8b1..08fa15bb669 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +Tue Mar 18 13:14:05 CET 2003 Jan Hubicka <jh@suse.cz> + + * gcc.dg/i386-cvt-1.c: New test. + 2003-03-17 Zack Weinberg <zack@codesourcery.com> * objc.dg/naming-1.m: Use "(parse|syntax) error". diff --git a/gcc/testsuite/gcc.dg/i386-cvt-1.c b/gcc/testsuite/gcc.dg/i386-cvt-1.c new file mode 100644 index 00000000000..c4558d7a1f2 --- /dev/null +++ b/gcc/testsuite/gcc.dg/i386-cvt-1.c @@ -0,0 +1,12 @@ +/* { dg-do compile { target i?86-*-* x86_64-*-* } } */ +/* { dg-options "-O2 -march=k8 -mfpmath=sse" } */ +/* { dg-final { scan-assembler "cvttsd2si.*xmm" } } */ +/* { dg-final { scan-assembler "cvttss2si.*xmm" } } */ +int a,a1; +double b; +float b1; +t() +{ + a=b; + a1=b1; +} |

