summaryrefslogtreecommitdiff
path: root/gcc/expmed.c
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>2001-12-17 14:20:03 -0700
committerJeff Law <law@gcc.gnu.org>2001-12-17 14:20:03 -0700
commit8f08e8c0109982010936ca486b0a7ef7a3d8bd88 (patch)
tree21dbd2506dad7faa36fe6f8c9cd2635d13b7b777 /gcc/expmed.c
parent79503fdd334db52e65b8550cce54031eadda249a (diff)
downloadgcc-8f08e8c0109982010936ca486b0a7ef7a3d8bd88.tar.gz
expmed.c (emit_store_flag): Extract updated comparison code from the return value of compare_from_rtx.
* expmed.c (emit_store_flag): Extract updated comparison code from the return value of compare_from_rtx. * expr.c (do_store_flag): Similarly. From-SVN: r48128
Diffstat (limited to 'gcc/expmed.c')
-rw-r--r--gcc/expmed.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c
index 8eecca34efa..f2c4aa22450 100644
--- a/gcc/expmed.c
+++ b/gcc/expmed.c
@@ -4350,12 +4350,13 @@ emit_store_flag (target, code, op0, op1, mode, unsignedp, normalizep)
: normalizep == -1 ? constm1_rtx
: const_true_rtx);
- /* If the code of COMPARISON doesn't match CODE, something is
- wrong; we can no longer be sure that we have the operation.
- We could handle this case, but it should not happen. */
+ /* The code of COMPARISON may not match CODE if compare_from_rtx
+ decided to swap its operands and reverse the original code.
- if (GET_CODE (comparison) != code)
- abort ();
+ We know that compare_from_rtx returns either a CONST_INT or
+ a new comparison code, so it is safe to just extract the
+ code from COMPARISON. */
+ code = GET_CODE (comparison);
/* Get a reference to the target in the proper mode for this insn. */
compare_mode = insn_data[(int) icode].operand[0].mode;