1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -passes=instcombine -S -o - | FileCheck %s
4 define i32 @a(<4 x i64> %I) {
6 ; CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x i64> [[I:%.*]] to <8 x i32>
7 ; CHECK-NEXT: [[K:%.*]] = extractelement <8 x i32> [[TMP1]], i64 6
8 ; CHECK-NEXT: ret i32 [[K]]
10 %J = trunc <4 x i64> %I to <4 x i32>
11 %K = extractelement <4 x i32> %J, i32 3
15 define i32 @b(<4 x float> %I) {
17 ; CHECK-NEXT: [[TMP1:%.*]] = extractelement <4 x float> [[I:%.*]], i64 3
18 ; CHECK-NEXT: [[K:%.*]] = fptosi float [[TMP1]] to i32
19 ; CHECK-NEXT: ret i32 [[K]]
21 %J = fptosi <4 x float> %I to <4 x i32>
22 %K = extractelement <4 x i32> %J, i32 3