OSDN Git Service

Add another test case for r321489
authorPhilip Reames <listmail@philipreames.com>
Sat, 30 Dec 2017 04:10:48 +0000 (04:10 +0000)
committerPhilip Reames <listmail@philipreames.com>
Sat, 30 Dec 2017 04:10:48 +0000 (04:10 +0000)
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: https://llvm.org/svn/llvm-project/llvm/trunk@321573 91177308-0d34-0410-b5e6-96231b3b80d8

test/Transforms/InstCombine/extractelement.ll

index 66fbd25..242f062 100644 (file)
@@ -9,3 +9,12 @@ define i32 @extractelement_out_of_range(<2 x i32> %x) {
   %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
+}