1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4
2 ; RUN: opt -S -passes=instsimplify < %s | FileCheck %s
4 ; Just make sure that we don't assert.
5 define i32 @test(<2 x i16> %a, i32 %b) {
6 ; CHECK-LABEL: define i32 @test(
7 ; CHECK-SAME: <2 x i16> [[A:%.*]], i32 [[B:%.*]]) {
8 ; CHECK-NEXT: [[MUL:%.*]] = mul <2 x i16> [[A]], <i16 -1, i16 poison>
9 ; CHECK-NEXT: [[BC:%.*]] = bitcast <2 x i16> [[MUL]] to i32
10 ; CHECK-NEXT: [[LSHR:%.*]] = lshr i32 [[B]], [[BC]]
11 ; CHECK-NEXT: ret i32 [[LSHR]]
13 %mul = mul <2 x i16> %a, <i16 -1, i16 poison>
14 %bc = bitcast <2 x i16> %mul to i32
15 %lshr = lshr i32 %b, %bc