Skip to content

Commit b5164b3

Browse files
committed
Prevent despeculation of count-zero operations on Z80
1 parent 51b05c1 commit b5164b3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

llvm/lib/Target/Z80/Z80ISelLowering.h

+8
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,14 @@ class Z80TargetLowering final : public TargetLowering {
8585
public:
8686
Z80TargetLowering(const Z80TargetMachine &TM, const Z80Subtarget &STI);
8787

88+
bool isCheapToSpeculateCttz() const override {
89+
return true;
90+
}
91+
92+
bool isCheapToSpeculateCtlz() const override {
93+
return true;
94+
}
95+
8896
private:
8997
unsigned getJumpTableEncoding() const override;
9098

0 commit comments

Comments
 (0)