39 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt -passes=slp-vectorizer -S %s | FileCheck %s3 4target datalayout = "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-f64:32:64-f80:32-n8:16:32-S128"5target triple = "i386-unknown-linux-gnu"6 7; Make sure we do not crash while computing the cost for @test.8define i1 @test(ptr %p1, ptr %p2, ptr %p3, i1 %c) #0 {9; CHECK-LABEL: @test(10; CHECK-NEXT: [[L0:%.*]] = icmp ult ptr [[P2:%.*]], [[P1:%.*]]11; CHECK-NEXT: [[UMIN:%.*]] = select i1 [[L0]], ptr [[P2]], ptr [[P1]]12; CHECK-NEXT: [[SCEVGEP31:%.*]] = getelementptr float, ptr [[P1]], i32 113; CHECK-NEXT: [[L1:%.*]] = icmp ult ptr [[SCEVGEP31]], [[P2]]14; CHECK-NEXT: [[UMIN33:%.*]] = select i1 [[L1]], ptr [[SCEVGEP31]], ptr [[P2]]15; CHECK-NEXT: [[BOUND0:%.*]] = icmp ugt ptr [[P3:%.*]], [[UMIN]]16; CHECK-NEXT: [[FOUND_CONFLICT:%.*]] = and i1 [[BOUND0]], [[C:%.*]]17; CHECK-NEXT: [[BOUND042:%.*]] = icmp ugt ptr [[P3]], [[UMIN33]]18; CHECK-NEXT: [[FOUND_CONFLICT44:%.*]] = and i1 [[BOUND042]], [[C]]19; CHECK-NEXT: [[OP_RDX:%.*]] = or i1 [[C]], [[FOUND_CONFLICT]]20; CHECK-NEXT: [[OP_RDX1:%.*]] = or i1 [[OP_RDX]], [[FOUND_CONFLICT44]]21; CHECK-NEXT: ret i1 [[OP_RDX1]]22;23 %l0 = icmp ult ptr %p2, %p124 %umin = select i1 %l0, ptr %p2, ptr %p125 %scevgep31 = getelementptr float, ptr %p1, i32 126 %l1 = icmp ult ptr %scevgep31, %p227 %umin33 = select i1 %l1, ptr %scevgep31, ptr %p228 %bound0 = icmp ugt ptr %p3, %umin29 %found.conflict = and i1 %bound0, %c30 %conflict.rdx = or i1 %found.conflict, %c31 %bound042 = icmp ugt ptr %p3, %umin3332 %found.conflict44 = and i1 %bound042, %c33 %conflict.rdx45 = or i1 %conflict.rdx, %found.conflict4434 %conflict.rdx49 = or i1 %conflict.rdx45, %c35 ret i1 %conflict.rdx4936}37 38attributes #0 = { "target-cpu"="pentium-m" }39