From 81540f2b8d8fe1ffee65d080a352e7fef2cae0dd Mon Sep 17 00:00:00 2001 From: Evgeny Stupachenko Date: Sat, 4 Mar 2017 03:14:05 +0000 Subject: [PATCH] Set option enabling LSR alternative way to resolve complex solution to false. Differential Revision: http://reviews.llvm.org/D29862 From: Evgeny Stupachenko git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296959 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/LoopStrengthReduce.cpp | 2 +- test/Transforms/LoopStrengthReduce/2013-01-14-ReuseCast.ll | 2 +- test/Transforms/LoopStrengthReduce/ARM/ivchain-ARM.ll | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/lib/Transforms/Scalar/LoopStrengthReduce.cpp index d9510e7f997..1dad080efbf 100644 --- a/lib/Transforms/Scalar/LoopStrengthReduce.cpp +++ b/lib/Transforms/Scalar/LoopStrengthReduce.cpp @@ -136,7 +136,7 @@ static cl::opt InsnsCost( // Flag to choose how to narrow complex lsr solution static cl::opt LSRExpNarrow( - "lsr-exp-narrow", cl::Hidden, cl::init(true), + "lsr-exp-narrow", cl::Hidden, cl::init(false), cl::desc("Narrow LSR complex solution using" " expectation of registers number")); diff --git a/test/Transforms/LoopStrengthReduce/2013-01-14-ReuseCast.ll b/test/Transforms/LoopStrengthReduce/2013-01-14-ReuseCast.ll index 2a83bea12e2..dcd068191e1 100644 --- a/test/Transforms/LoopStrengthReduce/2013-01-14-ReuseCast.ll +++ b/test/Transforms/LoopStrengthReduce/2013-01-14-ReuseCast.ll @@ -14,7 +14,7 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f3 ; current LSR cost model. ; CHECK-NOT: = ptrtoint i8* undef to i64 ; CHECK: .lr.ph -; CHECK: [[TMP:%[^ ]+]] = add i64 %4, 1 +; CHECK: [[TMP:%[^ ]+]] = add i64 %tmp5, 1 ; CHECK: sub i64 [[TMP]], %tmp6 ; CHECK: ret void define void @VerifyDiagnosticConsumerTest() unnamed_addr nounwind uwtable align 2 { diff --git a/test/Transforms/LoopStrengthReduce/ARM/ivchain-ARM.ll b/test/Transforms/LoopStrengthReduce/ARM/ivchain-ARM.ll index bd2f9f3b7e0..78884210108 100644 --- a/test/Transforms/LoopStrengthReduce/ARM/ivchain-ARM.ll +++ b/test/Transforms/LoopStrengthReduce/ARM/ivchain-ARM.ll @@ -139,7 +139,7 @@ for.end: ; preds = %for.body, %entry ; Consequently, we should *not* form any chains. ; ; A9: foldedidx: -; A9: ldrb{{(.w)?}} {{r[0-9]|lr}}, [{{r[0-9]|lr}}, #403] +; A9: ldrb{{(.w)?}} {{r[0-9]|lr}}, [{{r[0-9]|lr}}, #3] define void @foldedidx(i8* nocapture %a, i8* nocapture %b, i8* nocapture %c) nounwind ssp { entry: br label %for.body -- 2.50.1