Commit 8dfa3bb0 by Jan Hubicka Committed by Jan Hubicka

* i386.md (cvtts?2si peep2): New.

From-SVN: r64537
parent 1e788887
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> 2003-03-18 Kazu Hirata <kazu@cs.umass.edu>
* config/h8300/h8300.md (*iorsi3_two_qi_zext): New. * config/h8300/h8300.md (*iorsi3_two_qi_zext): New.
......
...@@ -4516,6 +4516,16 @@ ...@@ -4516,6 +4516,16 @@
(set (match_dup 0) (fix:DI (match_dup 2)))] (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" (define_insn "fix_truncdfdi_sse"
[(set (match_operand:DI 0 "register_operand" "=r,r") [(set (match_operand:DI 0 "register_operand" "=r,r")
(fix:DI (match_operand:DF 1 "nonimmediate_operand" "Y,Ym")))] (fix:DI (match_operand:DF 1 "nonimmediate_operand" "Y,Ym")))]
...@@ -4534,6 +4544,16 @@ ...@@ -4534,6 +4544,16 @@
(set (match_dup 0) (fix:DI (match_dup 2)))] (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. ;; Signed conversion to SImode.
(define_expand "fix_truncxfsi2" (define_expand "fix_truncxfsi2"
...@@ -4647,6 +4667,16 @@ ...@@ -4647,6 +4667,16 @@
(set (match_dup 0) (fix:SI (match_dup 2)))] (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" (define_insn "fix_truncdfsi_sse"
[(set (match_operand:SI 0 "register_operand" "=r,r") [(set (match_operand:SI 0 "register_operand" "=r,r")
(fix:SI (match_operand:DF 1 "nonimmediate_operand" "Y,Ym")))] (fix:SI (match_operand:DF 1 "nonimmediate_operand" "Y,Ym")))]
...@@ -4659,6 +4689,16 @@ ...@@ -4659,6 +4689,16 @@
(define_peephole2 (define_peephole2
[(match_scratch:DF 2 "Y") [(match_scratch:DF 2 "Y")
(set (match_operand:SI 0 "register_operand" "") (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" "")))] (fix:SI (match_operand:DF 1 "nonimmediate_operand" "")))]
"TARGET_K8 && !optimize_size" "TARGET_K8 && !optimize_size"
[(set (match_dup 2) (match_dup 1)) [(set (match_dup 2) (match_dup 1))
......
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> 2003-03-17 Zack Weinberg <zack@codesourcery.com>
* objc.dg/naming-1.m: Use "(parse|syntax) error". * objc.dg/naming-1.m: Use "(parse|syntax) error".
......
/* { 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;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment