; 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
}

; 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
}

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
}

Add another test case for r321489
Add another test case for r321489

Went to reduce another fuzzer failure to find it's already been fixed, but the test case is slightly different so it's worth adding anyways.

Reduced from oss-fuzz #4768 test case



git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@321573 91177308-0d34-0410-b5e6-96231b3b80d8
