28 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt < %s -passes=instcombine -S | FileCheck %s3 4target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"5target triple = "x86_64-unknown-linux-gnu"6 7; A copy of assume.ll, with undef at insertelement/shufflevector replaced with8; poison.9declare void @llvm.assume(i1) #110 11; This would crash.12; Does it ever make sense to peek through a bitcast of the icmp operand?13 14define i32 @PR40940(<4 x i8> %x) {15; CHECK-LABEL: @PR40940(16; CHECK-NEXT: [[SHUF:%.*]] = shufflevector <4 x i8> [[X:%.*]], <4 x i8> poison, <4 x i32> <i32 1, i32 1, i32 2, i32 3>17; CHECK-NEXT: [[T2:%.*]] = bitcast <4 x i8> [[SHUF]] to i3218; CHECK-NEXT: [[T3:%.*]] = icmp ult i32 [[T2]], 6553619; CHECK-NEXT: call void @llvm.assume(i1 [[T3]])20; CHECK-NEXT: ret i32 [[T2]]21;22 %shuf = shufflevector <4 x i8> %x, <4 x i8> poison, <4 x i32> <i32 1, i32 1, i32 2, i32 3>23 %t2 = bitcast <4 x i8> %shuf to i3224 %t3 = icmp ult i32 %t2, 6553625 call void @llvm.assume(i1 %t3)26 ret i32 %t227}28