diff options
| -rw-r--r-- | simplify.c | 2 | ||||
| -rw-r--r-- | validation/optim/shift-big.c | 7 |
2 files changed, 9 insertions, 0 deletions
@@ -557,6 +557,8 @@ static int simplify_shift(struct instruction *insn, pseudo_t pseudo, long long v break; case OP_LSR: size = operand_size(insn, pseudo); + /* fall through */ + case OP_SHL: if (value >= size) return replace_with_pseudo(insn, value_pseudo(0)); } diff --git a/validation/optim/shift-big.c b/validation/optim/shift-big.c index 3249854e..da65c5cd 100644 --- a/validation/optim/shift-big.c +++ b/validation/optim/shift-big.c @@ -3,6 +3,7 @@ typedef int s32; static u32 lsr32(u32 a) { return a >> 32; } static s32 asr32(s32 a) { return a >> 32; } +static u32 shl32(u32 a) { return a << 32; } /* * check-name: optim/shift-big.c @@ -23,5 +24,11 @@ asr32: ret.32 %r5 +shl32: +.L4: + <entry-point> + ret.32 $0 + + * check-output-end */ |
