diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2007-09-14 21:24:26 +0200 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2007-09-14 21:24:26 +0200 |
commit | 21da84bd5e7c0b1f2bdfa28429b066a098307f44 (patch) | |
tree | 4abcf9dad0688d3ff2d411ff47c86465f62bf3c4 /gcc/config | |
parent | 56e449d39af4a5c032d8d1f2825182ebed7a1a75 (diff) | |
download | gcc-21da84bd5e7c0b1f2bdfa28429b066a098307f44.zip gcc-21da84bd5e7c0b1f2bdfa28429b066a098307f44.tar.gz gcc-21da84bd5e7c0b1f2bdfa28429b066a098307f44.tar.bz2 |
re PR target/33438 (ICE in cselib_record_set, at cselib.c:1515 on x86)
PR target/33438
* config/i386/i386.md (fmodxf3): Copy operands[2] to temporary register
when operands[2] equals operands[1].
(remainderxf3): Ditto.
testsuite/ChangeLog:
PR target/33438
* gcc.target/i386/pr33438.c: New test.
From-SVN: r128502
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/i386/i386.md | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index a0e0c82..622686b 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -16691,10 +16691,18 @@ { rtx label = gen_label_rtx (); - emit_label (label); + rtx op2; + + if (rtx_equal_p (operands[1], operands[2])) + { + op2 = gen_reg_rtx (XFmode); + emit_move_insn (op2, operands[2]); + } + else + op2 = operands[2]; - emit_insn (gen_fpremxf4_i387 (operands[1], operands[2], - operands[1], operands[2])); + emit_label (label); + emit_insn (gen_fpremxf4_i387 (operands[1], op2, operands[1], op2)); ix86_emit_fp_unordered_jump (label); LABEL_NUSES (label) = 1; @@ -16755,10 +16763,18 @@ { rtx label = gen_label_rtx (); - emit_label (label); + rtx op2; + + if (rtx_equal_p (operands[1], operands[2])) + { + op2 = gen_reg_rtx (XFmode); + emit_move_insn (op2, operands[2]); + } + else + op2 = operands[2]; - emit_insn (gen_fprem1xf4_i387 (operands[1], operands[2], - operands[1], operands[2])); + emit_label (label); + emit_insn (gen_fprem1xf4_i387 (operands[1], op2, operands[1], op2)); ix86_emit_fp_unordered_jump (label); LABEL_NUSES (label) = 1; |