39 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mcpu=core-avx2 > /dev/null3; This test crashed on variable shift creation on AVX24 5target datalayout = "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128"6target triple = "i386-unknown-linux-gnu"7 8define void @f_f(ptr noalias nocapture %RET, float %aFOO, i32 %div) {9allocas:10 %__idiv_table_u32_offset10_offset_load.i = add i64 0, -211 br label %if_then18.i12 13if_then18.i:14 %aFOO_load_to_uint32 = fptoui float %aFOO to i3215 %aFOO_load_to_uint32_broadcast_init = insertelement <8 x i32> undef, i32 %aFOO_load_to_uint32, i32 016 %aFOO_load_to_uint32_broadcast = shufflevector <8 x i32> %aFOO_load_to_uint32_broadcast_init, <8 x i32> undef, <8 x i32> zeroinitializer17 18 %multiplier_load_broadcast_init.i = insertelement <8 x i64> undef, i64 2, i32 019 %multiplier_load_broadcast.i = shufflevector <8 x i64> %multiplier_load_broadcast_init.i, <8 x i64> undef, <8 x i32> zeroinitializer20 %numerator_load_to_uint64.i = zext <8 x i32> %aFOO_load_to_uint32_broadcast to <8 x i64>21 22 ;if replace '%__idiv_table_u32_offset10_offset_load.i' with '-2' or remove 'if_then18.i' label the error disappears23 %add__shift_load21.i = add i64 %__idiv_table_u32_offset10_offset_load.i, 3224 %add__shift_load21_broadcast_init.i = insertelement <8 x i64> undef, i64 %add__shift_load21.i, i32 025 %add__shift_load21_broadcast.i = shufflevector <8 x i64> %add__shift_load21_broadcast_init.i, <8 x i64> undef, <8 x i32> zeroinitializer26 27 %mul_val_load_mult_load.i = mul <8 x i64> %numerator_load_to_uint64.i, %multiplier_load_broadcast.i28 %bitop22.i = lshr <8 x i64> %mul_val_load_mult_load.i, %add__shift_load21_broadcast.i29 %bitop22_to_uint32.i = trunc <8 x i64> %bitop22.i to <8 x i32>30 br label %__fast_idiv___UM_vyuunu.exit31 32 33__fast_idiv___UM_vyuunu.exit:34 %calltmp_to_float = uitofp <8 x i32> %bitop22_to_uint32.i to <8 x float>35 store <8 x float> %calltmp_to_float, ptr %RET, align 436 ret void37}38 39