Skip to content

Commit 2989ff7

Browse files
committed
[Xtensa] Disable hardware loops by default.
Disable hwloop by default and fix hwloop tests.
1 parent a3ce635 commit 2989ff7

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

llvm/lib/Target/Xtensa/XtensaTargetTransformInfo.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ using namespace llvm;
1313
#define DEBUG_TYPE "xtensatti"
1414

1515
static cl::opt<bool> DisableLowOverheadLoops(
16-
"disable-xtensa-hwloops", cl::Hidden, cl::init(false),
16+
"disable-xtensa-hwloops", cl::Hidden, cl::init(true),
1717
cl::desc("Disable the generation of hardware loops"));
1818

1919
bool XtensaTTIImpl::isHardwareLoopProfitable(Loop *L, ScalarEvolution &SE,

llvm/test/CodeGen/Xtensa/hwloop_inner_loop.ll

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: llc -O1 -mtriple=xtensa -mcpu=esp32 %s -o - | FileCheck %s
1+
; RUN: llc -O1 -mtriple=xtensa -mcpu=esp32 -disable-xtensa-hwloops=false %s -o - | FileCheck %s
22

33

44
; Function Attrs: norecurse nounwind optsize readnone

llvm/test/CodeGen/Xtensa/hwloop_unsuitable_loop.ll

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: llc -O1 -mtriple=xtensa -mcpu=esp32 %s -o - | FileCheck %s
1+
; RUN: llc -O1 -mtriple=xtensa -mcpu=esp32 -disable-xtensa-hwloops=false %s -o - | FileCheck %s
22

33
; Function Attrs: nounwind optsize
44
define i32 @test_hwloop(i32 %a, i32 %b, i32 %n) local_unnamed_addr #1 {

0 commit comments

Comments
 (0)