• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2; RUN: opt -slp-vectorizer -S %s | FileCheck %s
3
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(float* %p1, float* %p2, i8* %p3, i1 %c) #0 {
9; CHECK-LABEL: @test(
10; CHECK-NEXT:    [[SCEVGEP21:%.*]] = getelementptr float, float* [[P1:%.*]], i32 0
11; CHECK-NEXT:    [[L0:%.*]] = icmp ult float* [[P2:%.*]], [[SCEVGEP21]]
12; CHECK-NEXT:    [[UMIN:%.*]] = select i1 [[L0]], float* [[P2]], float* [[SCEVGEP21]]
13; CHECK-NEXT:    [[UMIN22:%.*]] = bitcast float* [[UMIN]] to i8*
14; CHECK-NEXT:    [[SCEVGEP31:%.*]] = getelementptr float, float* [[P1]], i32 1
15; CHECK-NEXT:    [[L1:%.*]] = icmp ult float* [[SCEVGEP31]], [[P2]]
16; CHECK-NEXT:    [[UMIN33:%.*]] = select i1 [[L1]], float* [[SCEVGEP31]], float* [[P2]]
17; CHECK-NEXT:    [[UMIN3334:%.*]] = bitcast float* [[UMIN33]] to i8*
18; CHECK-NEXT:    [[BOUND0:%.*]] = icmp ugt i8* [[P3:%.*]], [[UMIN22]]
19; CHECK-NEXT:    [[FOUND_CONFLICT:%.*]] = and i1 [[BOUND0]], [[C:%.*]]
20; CHECK-NEXT:    [[CONFLICT_RDX:%.*]] = or i1 [[FOUND_CONFLICT]], [[C]]
21; CHECK-NEXT:    [[BOUND042:%.*]] = icmp ugt i8* [[P3]], [[UMIN3334]]
22; CHECK-NEXT:    [[FOUND_CONFLICT44:%.*]] = and i1 [[BOUND042]], [[C]]
23; CHECK-NEXT:    [[CONFLICT_RDX45:%.*]] = or i1 [[CONFLICT_RDX]], [[FOUND_CONFLICT44]]
24; CHECK-NEXT:    [[CONFLICT_RDX49:%.*]] = or i1 [[CONFLICT_RDX45]], [[C]]
25; CHECK-NEXT:    ret i1 [[CONFLICT_RDX49]]
26;
27  %scevgep21 = getelementptr float, float* %p1, i32 0
28  %l0 = icmp ult float* %p2, %scevgep21
29  %umin = select i1 %l0, float* %p2, float* %scevgep21
30  %umin22 = bitcast float* %umin to i8*
31  %scevgep31 = getelementptr float, float* %p1, i32 1
32  %l1 = icmp ult float* %scevgep31, %p2
33  %umin33 = select i1 %l1, float* %scevgep31, float* %p2
34  %umin3334 = bitcast float* %umin33 to i8*
35  %bound0 = icmp ugt i8* %p3, %umin22
36  %found.conflict = and i1 %bound0, %c
37  %conflict.rdx = or i1 %found.conflict, %c
38  %bound042 = icmp ugt i8* %p3, %umin3334
39  %found.conflict44 = and i1 %bound042, %c
40  %conflict.rdx45 = or i1 %conflict.rdx, %found.conflict44
41  %conflict.rdx49 = or i1 %conflict.rdx45, %c
42  ret i1 %conflict.rdx49
43}
44
45attributes #0 = { "target-cpu"="pentium-m" }
46