diff options
| author | Clement Courbet <courbet@google.com> | 2019-03-27 17:44:16 +0000 |
|---|---|---|
| committer | Clement Courbet <courbet@google.com> | 2019-03-27 17:44:16 +0000 |
| commit | f8666b0649f8ac9624ae4b52bc50df20aa328e0a (patch) | |
| tree | 17dec0823bf498b2595b0ef7a7fd5b347421157a /llvm/test/Transforms/LoopStrengthReduce | |
| parent | 7b14b2425d607a97629643fd6d84ee2e64f5554d (diff) | |
| download | bcm5719-llvm-f8666b0649f8ac9624ae4b52bc50df20aa328e0a.tar.gz bcm5719-llvm-f8666b0649f8ac9624ae4b52bc50df20aa328e0a.zip | |
[X86MacroFusion][NFC] Add a bulldozer test.
llvm-svn: 357099
Diffstat (limited to 'llvm/test/Transforms/LoopStrengthReduce')
| -rw-r--r-- | llvm/test/Transforms/LoopStrengthReduce/X86/macro-fuse-cmp.ll | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/llvm/test/Transforms/LoopStrengthReduce/X86/macro-fuse-cmp.ll b/llvm/test/Transforms/LoopStrengthReduce/X86/macro-fuse-cmp.ll index ba0da164916..21a1799fc7c 100644 --- a/llvm/test/Transforms/LoopStrengthReduce/X86/macro-fuse-cmp.ll +++ b/llvm/test/Transforms/LoopStrengthReduce/X86/macro-fuse-cmp.ll @@ -1,5 +1,6 @@ ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py ; RUN: opt < %s -loop-reduce -mcpu=btver2 -S | FileCheck %s --check-prefix=JAG +; RUN: opt < %s -loop-reduce -mcpu=bdver2 -S | FileCheck %s --check-prefix=BUL ; RUN: opt < %s -loop-reduce -mcpu=haswell -S | FileCheck %s --check-prefix=HSW ; RUN: llc < %s | FileCheck %s --check-prefix=BASE @@ -41,6 +42,28 @@ define void @maxArray(double* noalias nocapture %x, double* noalias nocapture re ; JAG: exit: ; JAG-NEXT: ret void ; +; BUL-LABEL: @maxArray( +; BUL-NEXT: entry: +; BUL-NEXT: br label [[VECTOR_BODY:%.*]] +; BUL: vector.body: +; BUL-NEXT: [[INDEX:%.*]] = phi i64 [ 0, [[ENTRY:%.*]] ], [ [[INDEX_NEXT:%.*]], [[VECTOR_BODY]] ] +; BUL-NEXT: [[SCEVGEP4:%.*]] = getelementptr double, double* [[X:%.*]], i64 [[INDEX]] +; BUL-NEXT: [[SCEVGEP45:%.*]] = bitcast double* [[SCEVGEP4]] to <2 x double>* +; BUL-NEXT: [[SCEVGEP:%.*]] = getelementptr double, double* [[Y:%.*]], i64 [[INDEX]] +; BUL-NEXT: [[SCEVGEP1:%.*]] = bitcast double* [[SCEVGEP]] to <2 x double>* +; BUL-NEXT: [[XVAL:%.*]] = load <2 x double>, <2 x double>* [[SCEVGEP45]], align 8 +; BUL-NEXT: [[YVAL:%.*]] = load <2 x double>, <2 x double>* [[SCEVGEP1]], align 8 +; BUL-NEXT: [[CMP:%.*]] = fcmp ogt <2 x double> [[YVAL]], [[XVAL]] +; BUL-NEXT: [[MAX:%.*]] = select <2 x i1> [[CMP]], <2 x double> [[YVAL]], <2 x double> [[XVAL]] +; BUL-NEXT: [[SCEVGEP2:%.*]] = getelementptr double, double* [[X]], i64 [[INDEX]] +; BUL-NEXT: [[SCEVGEP23:%.*]] = bitcast double* [[SCEVGEP2]] to <2 x double>* +; BUL-NEXT: store <2 x double> [[MAX]], <2 x double>* [[SCEVGEP23]], align 8 +; BUL-NEXT: [[INDEX_NEXT]] = add i64 [[INDEX]], 2 +; BUL-NEXT: [[DONE:%.*]] = icmp eq i64 [[INDEX_NEXT]], 65536 +; BUL-NEXT: br i1 [[DONE]], label [[EXIT:%.*]], label [[VECTOR_BODY]] +; BUL: exit: +; BUL-NEXT: ret void +; ; HSW-LABEL: @maxArray( ; HSW-NEXT: entry: ; HSW-NEXT: br label [[VECTOR_BODY:%.*]] @@ -77,7 +100,6 @@ define void @maxArray(double* noalias nocapture %x, double* noalias nocapture re ; BASE-NEXT: jne .LBB0_1 ; BASE-NEXT: # %bb.2: # %exit ; BASE-NEXT: retq -; ; FUSE-LABEL: maxArray: ; FUSE: # %bb.0: # %entry ; FUSE-NEXT: xorl %eax, %eax |

