2017-12-27 20:00:18 +08:00
|
|
|
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
|
|
|
; RUN: opt < %s -instcombine -S | FileCheck %s
|
|
|
|
|
|
|
|
define i32 @extractelement_out_of_range(<2 x i32> %x) {
|
|
|
|
; CHECK-LABEL: @extractelement_out_of_range(
|
|
|
|
; CHECK-NEXT: [[E1:%.*]] = extractelement <2 x i32> [[X:%.*]], i8 16
|
|
|
|
; CHECK-NEXT: ret i32 [[E1]]
|
|
|
|
;
|
|
|
|
%E1 = extractelement <2 x i32> %x, i8 16
|
|
|
|
ret i32 %E1
|
|
|
|
}
|
2017-12-30 12:10:48 +08:00
|
|
|
|
|
|
|
define i32 @extractelement_type_out_of_range(<2 x i32> %x) {
|
|
|
|
; CHECK-LABEL: @extractelement_type_out_of_range(
|
|
|
|
; CHECK-NEXT: [[E1:%.*]] = extractelement <2 x i32> [[X:%.*]], i128 0
|
|
|
|
; CHECK-NEXT: ret i32 [[E1]]
|
|
|
|
;
|
|
|
|
%E1 = extractelement <2 x i32> %x, i128 0
|
|
|
|
ret i32 %E1
|
|
|
|
}
|