From bc02f8d3f74173fa46f74934ebcc1fc3501b94da Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 20 Nov 2002 10:43:20 +0100 Subject: combine.c (force_to_mode): Only replace with (not Y) if all bits in fuller_mask (not just mask) are set in C. * combine.c (force_to_mode): Only replace with (not Y) if all bits in fuller_mask (not just mask) are set in C. * gcc.c-torture/execute/20021118-3.c: New test. From-SVN: r59295 --- gcc/combine.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc/combine.c') diff --git a/gcc/combine.c b/gcc/combine.c index 8ce9d10..a0214d1 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -6978,10 +6978,10 @@ force_to_mode (x, mode, mask, reg, just_select) return force_to_mode (x, mode, mask, reg, next_select); } - /* Similarly, if C contains every bit in the mask, then we may + /* Similarly, if C contains every bit in the fuller_mask, then we may replace with (not Y). */ if (GET_CODE (XEXP (x, 0)) == CONST_INT - && ((INTVAL (XEXP (x, 0)) | (HOST_WIDE_INT) mask) + && ((INTVAL (XEXP (x, 0)) | (HOST_WIDE_INT) fuller_mask) == INTVAL (XEXP (x, 0)))) { x = simplify_gen_unary (NOT, GET_MODE (x), -- cgit v1.1