(modsi3): Move test of exact_log2 into extra condition.
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 11 Dec 1993 12:05:02 +0000 (12:05 +0000)
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 11 Dec 1993 12:05:02 +0000 (12:05 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6205 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/config/rs6000/rs6000.md

index a36623a..bb719a5 100644 (file)
   [(use (match_operand:SI 0 "gpc_reg_operand" ""))
    (use (match_operand:SI 1 "gpc_reg_operand" ""))
    (use (match_operand:SI 2 "const_int_operand" ""))]
-  ""
+  "exact_log2 (INTVAL (operands[2])) >= 0"
   "
 {
-  int i = exact_log2 (INTVAL (operands[2]));
   rtx temp1 = gen_reg_rtx (SImode);
   rtx temp2 = gen_reg_rtx (SImode);
 
-  if (i < 0)
-    FAIL;
-
   emit_insn (gen_divsi3 (temp1, operands[1], operands[2]));
-  emit_insn (gen_ashlsi3 (temp2, temp1, GEN_INT (i)));
+  emit_insn (gen_ashlsi3 (temp2, temp1,
+                         GEN_INT (exact_log2 (INTVAL (operands[2])))));
   emit_insn (gen_subsi3 (operands[0], operands[1], temp2));
   DONE;