* vax.md (casesi): Use emit_jump_insn. Tidy expander pattern.
authorRichard Henderson <rth@redhat.com>
Sun, 16 Jun 2002 19:41:11 +0000 (12:41 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Sun, 16 Jun 2002 19:41:11 +0000 (12:41 -0700)
From-SVN: r54673

gcc/ChangeLog
gcc/config/vax/vax.md

index 0dfb95c569e69c679a0484974657c9b6ed24538f..bad8dc246af24bdb4d02d552e555af58cc25488f 100644 (file)
@@ -1,3 +1,7 @@
+2002-06-16  Richard Henderson  <rth@redhat.com>
+
+        * vax.md (casesi): Use emit_jump_insn.  Tidy expander pattern.
+
 2002-06-16  Richard Henderson  <rth@redhat.com>
 
        * c-common.c (flag_ms_extensions): Move from c++ front end.
index c19427908df3e44bde753e26c782e930a93700eb..56e18a063912d5feab3b2f07deb8eda0814ed854 100644 (file)
 ;; This is here to accept 5 arguments (as passed by expand_end_case)
 ;; and pass the first 4 along to the casesi1 pattern that really does the work.
 (define_expand "casesi"
-  [(set (pc)
-       (if_then_else
-        (leu (minus:SI (match_operand:SI 0 "general_operand" "g")
-                       (match_operand:SI 1 "general_operand" "g"))
-             (match_operand:SI 2 "general_operand" "g"))
-        (plus:SI (sign_extend:SI
-                  (mem:HI (plus:SI (mult:SI (minus:SI (match_dup 0)
-                                                      (match_dup 1))
-                                            (const_int 2))
-                                   (pc))))
-                 (label_ref:SI (match_operand 3 "" "")))
-        (pc)))
-   (match_operand 4 "" "")]
+  [(match_operand:SI 0 "general_operand" "")   ; index
+   (match_operand:SI 1 "general_operand" "")   ; lower
+   (match_operand:SI 2 "general_operand" "")   ; upper-lower
+   (match_operand 3 "" "")                     ; table label
+   (match_operand 4 "" "")]                    ; default label
   ""
-  "
-  emit_insn (gen_casesi1 (operands[0], operands[1], operands[2], operands[3]));
+{
+  emit_jump_insn (gen_casesi1 (operands[0], operands[1],
+                              operands[2], operands[3]));
   DONE;
-")
+})
 
 (define_insn "casesi1"
   [(set (pc)