Skip to content

Commit 8bd6d36

Browse files
authored
[ARM] Override hasAndNotCompare (#145441)
bics is available on ARM. USAT regressions are to be fixed after this because that is an issue with the ARMISelLowering and should be another PR. Note that opt optimizes those testcases to min/max intrinsics anyway so this should have no real effect on codegen. Proof: https://alive2.llvm.org/ce/z/kPVQ3_
1 parent dc1a79a commit 8bd6d36

File tree

5 files changed

+273
-283
lines changed

5 files changed

+273
-283
lines changed

llvm/lib/Target/ARM/ARMISelLowering.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,11 @@ class VectorType;
609609

610610
bool isMaskAndCmp0FoldingBeneficial(const Instruction &AndI) const override;
611611

612+
bool hasAndNotCompare(SDValue V) const override {
613+
// We can use bics for any scalar.
614+
return V.getValueType().isScalarInteger();
615+
}
616+
612617
bool
613618
isShuffleMaskLegal(ArrayRef<int> M, EVT VT) const override;
614619
bool isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const override;

0 commit comments

Comments
 (0)