diff --git a/llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp b/llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp index 30fdd55e7473da..a582df935dad58 100644 --- a/llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp +++ b/llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp @@ -1517,8 +1517,6 @@ bool AArch64InstructionSelector::select(MachineInstr &I) { // Speculation tracking/SLH assumes that optimized TB(N)Z/CB(N)Z // instructions will not be produced, as they are conditional branch // instructions that do not set flags. - bool ProduceNonFlagSettingCondBr = - !MF.getFunction().hasFnAttribute(Attribute::SpeculativeLoadHardening); if (ProduceNonFlagSettingCondBr && selectCompareBranch(I, MF, MRI)) return true;