|
| 1 | +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py |
| 2 | +; RUN: opt < %s -passes=slp-vectorizer -mtriple=riscv64 -mattr=+v -S | FileCheck %s |
| 3 | + |
| 4 | +@s1 = dso_local local_unnamed_addr global [4 x double] zeroinitializer, align 32 |
| 5 | +@s2 = dso_local local_unnamed_addr global [4 x double] zeroinitializer, align 32 |
| 6 | +@s3 = dso_local local_unnamed_addr global [64 x double] zeroinitializer, align 32 |
| 7 | + |
| 8 | +define void @foo() { |
| 9 | +; CHECK-LABEL: @foo( |
| 10 | +; CHECK-NEXT: entry: |
| 11 | +; CHECK-NEXT: [[TMP0:%.*]] = load double, ptr @s1, align 8 |
| 12 | +; CHECK-NEXT: [[TMP1:%.*]] = load double, ptr @s2, align 8 |
| 13 | +; CHECK-NEXT: [[CMP3:%.*]] = fcmp fast ogt double [[TMP0]], [[TMP1]] |
| 14 | +; CHECK-NEXT: [[COND:%.*]] = select fast i1 [[CMP3]], double -1.000000e+00, double 0.000000e+00 |
| 15 | +; CHECK-NEXT: store double [[COND]], ptr @s3, align 8 |
| 16 | +; CHECK-NEXT: [[TMP2:%.*]] = load double, ptr getelementptr inbounds ([4 x double], ptr @s1, i64 0, i64 1), align 8 |
| 17 | +; CHECK-NEXT: [[TMP3:%.*]] = load double, ptr getelementptr inbounds ([4 x double], ptr @s2, i64 0, i64 1), align 8 |
| 18 | +; CHECK-NEXT: [[CMP3_1:%.*]] = fcmp fast ogt double [[TMP2]], [[TMP3]] |
| 19 | +; CHECK-NEXT: [[COND_1:%.*]] = select fast i1 [[CMP3_1]], double -1.000000e+00, double 0.000000e+00 |
| 20 | +; CHECK-NEXT: store double [[COND_1]], ptr getelementptr inbounds ([64 x double], ptr @s3, i64 0, i64 1), align 8 |
| 21 | +; CHECK-NEXT: [[TMP4:%.*]] = load double, ptr getelementptr inbounds ([4 x double], ptr @s1, i64 0, i64 2), align 8 |
| 22 | +; CHECK-NEXT: [[TMP5:%.*]] = load double, ptr getelementptr inbounds ([4 x double], ptr @s2, i64 0, i64 2), align 8 |
| 23 | +; CHECK-NEXT: [[CMP3_2:%.*]] = fcmp fast ogt double [[TMP4]], [[TMP5]] |
| 24 | +; CHECK-NEXT: [[COND_2:%.*]] = select fast i1 [[CMP3_2]], double -1.000000e+00, double 0.000000e+00 |
| 25 | +; CHECK-NEXT: store double [[COND_2]], ptr getelementptr inbounds ([64 x double], ptr @s3, i64 0, i64 2), align 8 |
| 26 | +; CHECK-NEXT: [[TMP6:%.*]] = load double, ptr getelementptr inbounds ([4 x double], ptr @s1, i64 0, i64 3), align 8 |
| 27 | +; CHECK-NEXT: [[TMP7:%.*]] = load double, ptr getelementptr inbounds ([4 x double], ptr @s2, i64 0, i64 3), align 8 |
| 28 | +; CHECK-NEXT: [[CMP3_3:%.*]] = fcmp fast ogt double [[TMP6]], [[TMP7]] |
| 29 | +; CHECK-NEXT: [[COND_3:%.*]] = select fast i1 [[CMP3_3]], double -1.000000e+00, double 0.000000e+00 |
| 30 | +; CHECK-NEXT: store double [[COND_3]], ptr getelementptr inbounds ([64 x double], ptr @s3, i64 0, i64 3), align 8 |
| 31 | +; CHECK-NEXT: [[CMP15:%.*]] = fcmp fast ule double [[TMP0]], [[TMP1]] |
| 32 | +; CHECK-NEXT: [[COND16:%.*]] = select fast i1 [[CMP15]], double -1.000000e+00, double 0.000000e+00 |
| 33 | +; CHECK-NEXT: store double [[COND16]], ptr getelementptr inbounds ([64 x double], ptr @s3, i64 0, i64 4), align 8 |
| 34 | +; CHECK-NEXT: [[CMP15_1:%.*]] = fcmp fast ule double [[TMP2]], [[TMP3]] |
| 35 | +; CHECK-NEXT: [[COND16_1:%.*]] = select fast i1 [[CMP15_1]], double -1.000000e+00, double 0.000000e+00 |
| 36 | +; CHECK-NEXT: store double [[COND16_1]], ptr getelementptr inbounds ([64 x double], ptr @s3, i64 0, i64 5), align 8 |
| 37 | +; CHECK-NEXT: [[CMP15_2:%.*]] = fcmp fast ule double [[TMP4]], [[TMP5]] |
| 38 | +; CHECK-NEXT: [[COND16_2:%.*]] = select fast i1 [[CMP15_2]], double -1.000000e+00, double 0.000000e+00 |
| 39 | +; CHECK-NEXT: store double [[COND16_2]], ptr getelementptr inbounds ([64 x double], ptr @s3, i64 0, i64 6), align 8 |
| 40 | +; CHECK-NEXT: [[CMP15_3:%.*]] = fcmp fast ule double [[TMP6]], [[TMP7]] |
| 41 | +; CHECK-NEXT: [[COND16_3:%.*]] = select fast i1 [[CMP15_3]], double -1.000000e+00, double 0.000000e+00 |
| 42 | +; CHECK-NEXT: store double [[COND16_3]], ptr getelementptr inbounds ([64 x double], ptr @s3, i64 0, i64 7), align 8 |
| 43 | +; CHECK-NEXT: ret void |
| 44 | +; |
| 45 | +entry: |
| 46 | + %0 = load double, ptr @s1, align 8 |
| 47 | + %1 = load double, ptr @s2, align 8 |
| 48 | + %cmp3 = fcmp fast ogt double %0, %1 |
| 49 | + %cond = select fast i1 %cmp3, double -1.000000e+00, double 0.000000e+00 |
| 50 | + store double %cond, ptr @s3, align 8 |
| 51 | + %2 = load double, ptr getelementptr inbounds ([4 x double], ptr @s1, i64 0, i64 1), align 8 |
| 52 | + %3 = load double, ptr getelementptr inbounds ([4 x double], ptr @s2, i64 0, i64 1), align 8 |
| 53 | + %cmp3.1 = fcmp fast ogt double %2, %3 |
| 54 | + %cond.1 = select fast i1 %cmp3.1, double -1.000000e+00, double 0.000000e+00 |
| 55 | + store double %cond.1, ptr getelementptr inbounds ([64 x double], ptr @s3, i64 0, i64 1), align 8 |
| 56 | + %4 = load double, ptr getelementptr inbounds ([4 x double], ptr @s1, i64 0, i64 2), align 8 |
| 57 | + %5 = load double, ptr getelementptr inbounds ([4 x double], ptr @s2, i64 0, i64 2), align 8 |
| 58 | + %cmp3.2 = fcmp fast ogt double %4, %5 |
| 59 | + %cond.2 = select fast i1 %cmp3.2, double -1.000000e+00, double 0.000000e+00 |
| 60 | + store double %cond.2, ptr getelementptr inbounds ([64 x double], ptr @s3, i64 0, i64 2), align 8 |
| 61 | + %6 = load double, ptr getelementptr inbounds ([4 x double], ptr @s1, i64 0, i64 3), align 8 |
| 62 | + %7 = load double, ptr getelementptr inbounds ([4 x double], ptr @s2, i64 0, i64 3), align 8 |
| 63 | + %cmp3.3 = fcmp fast ogt double %6, %7 |
| 64 | + %cond.3 = select fast i1 %cmp3.3, double -1.000000e+00, double 0.000000e+00 |
| 65 | + store double %cond.3, ptr getelementptr inbounds ([64 x double], ptr @s3, i64 0, i64 3), align 8 |
| 66 | + %cmp15 = fcmp fast ule double %0, %1 |
| 67 | + %cond16 = select fast i1 %cmp15, double -1.000000e+00, double 0.000000e+00 |
| 68 | + store double %cond16, ptr getelementptr inbounds ([64 x double], ptr @s3, i64 0, i64 4), align 8 |
| 69 | + %cmp15.1 = fcmp fast ule double %2, %3 |
| 70 | + %cond16.1 = select fast i1 %cmp15.1, double -1.000000e+00, double 0.000000e+00 |
| 71 | + store double %cond16.1, ptr getelementptr inbounds ([64 x double], ptr @s3, i64 0, i64 5), align 8 |
| 72 | + %cmp15.2 = fcmp fast ule double %4, %5 |
| 73 | + %cond16.2 = select fast i1 %cmp15.2, double -1.000000e+00, double 0.000000e+00 |
| 74 | + store double %cond16.2, ptr getelementptr inbounds ([64 x double], ptr @s3, i64 0, i64 6), align 8 |
| 75 | + %cmp15.3 = fcmp fast ule double %6, %7 |
| 76 | + %cond16.3 = select fast i1 %cmp15.3, double -1.000000e+00, double 0.000000e+00 |
| 77 | + store double %cond16.3, ptr getelementptr inbounds ([64 x double], ptr @s3, i64 0, i64 7), align 8 |
| 78 | + ret void |
| 79 | +} |
0 commit comments