[llvm] r357099 - [X86MacroFusion][NFC] Add a bulldozer test.
Clement Courbet via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 27 10:44:16 PDT 2019
Author: courbet
Date: Wed Mar 27 10:44:16 2019
New Revision: 357099
URL: http://llvm.org/viewvc/llvm-project?rev=357099&view=rev
Log:
[X86MacroFusion][NFC] Add a bulldozer test.
Modified:
llvm/trunk/test/Transforms/LoopStrengthReduce/X86/macro-fuse-cmp.ll
Modified: llvm/trunk/test/Transforms/LoopStrengthReduce/X86/macro-fuse-cmp.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LoopStrengthReduce/X86/macro-fuse-cmp.ll?rev=357099&r1=357098&r2=357099&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/LoopStrengthReduce/X86/macro-fuse-cmp.ll (original)
+++ llvm/trunk/test/Transforms/LoopStrengthReduce/X86/macro-fuse-cmp.ll Wed Mar 27 10:44:16 2019
@@ -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 no
; 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 no
; 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
More information about the llvm-commits
mailing list