diff options
Diffstat (limited to 'gcc/config/i386/i386.md')
-rw-r--r-- | gcc/config/i386/i386.md | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 7691160c0c4..2bb58236d88 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -8942,7 +8942,24 @@ [(parallel [(set (match_dup 0) (zero_extend:DI (and:SI (match_dup 1) (match_dup 2)))) (clobber (reg:CC FLAGS_REG))])] - "operands[2] = gen_lowpart (SImode, operands[2]);") +{ + if (GET_CODE (operands[2]) == SYMBOL_REF + || GET_CODE (operands[2]) == LABEL_REF) + { + operands[2] = shallow_copy_rtx (operands[2]); + PUT_MODE (operands[2], SImode); + } + else if (GET_CODE (operands[2]) == CONST) + { + /* (const:DI (plus:DI (symbol_ref:DI ("...")) (const_int N))) */ + operands[2] = copy_rtx (operands[2]); + PUT_MODE (operands[2], SImode); + PUT_MODE (XEXP (operands[2], 0), SImode); + PUT_MODE (XEXP (XEXP (operands[2], 0), 0), SImode); + } + else + operands[2] = gen_lowpart (SImode, operands[2]); +}) ;; See comment for addsi_1_zext why we do use nonimmediate_operand (define_insn "*andsi_1_zext" |