Skip to content

Commit df2770a

Browse files
committed
Adjust codegen parameters
Created using spr 1.3.5
1 parent c196033 commit df2770a

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

llvm/lib/Target/Sparc/SparcISelLowering.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3588,6 +3588,8 @@ bool SparcTargetLowering::isFPImmLegal(const APFloat &Imm, EVT VT,
35883588
Imm.isZero();
35893589
}
35903590

3591+
bool SparcTargetLowering::isCtlzFast() const { return Subtarget->isVIS3(); }
3592+
35913593
// Override to disable global variable loading on Linux.
35923594
void SparcTargetLowering::insertSSPDeclarations(Module &M) const {
35933595
if (!Subtarget->isTargetLinux())

llvm/lib/Target/Sparc/SparcISelLowering.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,12 @@ namespace llvm {
210210
bool isFPImmLegal(const APFloat &Imm, EVT VT,
211211
bool ForCodeSize) const override;
212212

213+
bool isCtlzFast() const override;
214+
215+
bool isCheapToSpeculateCtlz(Type *Ty) const override {
216+
return isCtlzFast();
217+
}
218+
213219
bool shouldInsertFencesForAtomic(const Instruction *I) const override {
214220
// FIXME: We insert fences for each atomics and generate
215221
// sub-optimal code for PSO/TSO. (Approximately nobody uses any

0 commit comments

Comments
 (0)