aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.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/expr.c
parent79503fdd334db52e65b8550cce54031eadda249a (diff)
downloadgcc-8f08e8c0109982010936ca486b0a7ef7a3d8bd88.zip
gcc-8f08e8c0109982010936ca486b0a7ef7a3d8bd88.tar.gz
gcc-8f08e8c0109982010936ca486b0a7ef7a3d8bd88.tar.bz2
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/expr.c')
-rw-r--r--gcc/expr.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index a36ce7b..74c8b44 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -10235,6 +10235,14 @@ do_store_flag (exp, target, mode, only_cheap)
|| (result != const0_rtx && invert))
? const0_rtx : const1_rtx);
+ /* The code of RESULT may not match CODE if compare_from_rtx
+ decided to swap its operands and reverse the original code.
+
+ 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 RESULT. */
+ code = GET_CODE (result);
+
label = gen_label_rtx ();
if (bcc_gen_fctn[(int) code] == 0)
abort ();