reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47
   48
   49
   50
   51
   52
   53
   54
   55
   56
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt < %s -instsimplify -S | FileCheck %s

; Weird Types

define i129 @vec_extract_negidx(<3 x i129> %a) {
; CHECK-LABEL: @vec_extract_negidx(
; CHECK-NEXT:    ret i129 undef
;
  %E1 = extractelement <3 x i129> %a, i129 -1
  ret i129 %E1
}

define i129 @vec_extract_out_of_bounds(<3 x i129> %a) {
; CHECK-LABEL: @vec_extract_out_of_bounds(
; CHECK-NEXT:    ret i129 undef
;
  %E1 = extractelement <3 x i129> %a, i129 3
  ret i129 %E1
}

define i129 @vec_extract_out_of_bounds2(<3 x i129> %a) {
; CHECK-LABEL: @vec_extract_out_of_bounds2(
; CHECK-NEXT:    ret i129 undef
;
  %E1 = extractelement <3 x i129> %a, i129 999999999999999
  ret i129 %E1
}


define i129 @vec_extract_undef_index(<3 x i129> %a) {
; CHECK-LABEL: @vec_extract_undef_index(
; CHECK-NEXT:    ret i129 undef
;
  %E1 = extractelement <3 x i129> %a, i129 undef
  ret i129 %E1
}


define i129 @vec_extract_in_bounds(<3 x i129> %a) {
; CHECK-LABEL: @vec_extract_in_bounds(
; CHECK-NEXT:    [[E1:%.*]] = extractelement <3 x i129> [[A:%.*]], i129 2
; CHECK-NEXT:    ret i129 [[E1]]
;
  %E1 = extractelement <3 x i129> %a, i129 2
  ret i129 %E1
}

define float @extract_element_splat_constant_vector_variable_index(i32 %y) {
; CHECK-LABEL: @extract_element_splat_constant_vector_variable_index(
; CHECK-NEXT:    ret float 2.000000e+00
;
  %r = extractelement <4 x float> <float 2.0, float 2.0, float 2.0, float 2.0>, i32 %y
  ret float %r
}