This adds some simple known bits handling for the three CSINC/NEG/INV instructions. From the operands known bits we can compute the common bits of the first operand and incremented/negated/inverted second operand. The first, especially CSINC ZR, ZR, comes up fair amount in the tests. The others are more rare so a unit test for them is added.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
LGTM, but to show willing I've spotted a typo in a comment :-)
llvm/lib/Target/ARM/ARMISelLowering.cpp | ||
---|---|---|
17810 |
This fails to compile for me, with this error:
ld.lld: error: undefined symbol: llvm::parseAssemblyString(llvm::StringRef, llvm::SMDiagnostic&, llvm::LLVMContext&, llvm::SlotMapping*) >>> referenced by ARMSelectionDAGTest.cpp >>> unittests/Target/ARM/CMakeFiles/ARMTests.dir/ARMSelectionDAGTest.cpp.o:(llvm::ARMSelectionDAGTest::SetUp())
You beat any of the buildbots to reporting a problem! I was wondering if something like that would come up.
Any details on the configuration you are using to trigger this? What makes it different to the configs that are working?
I can remove the unit test in the meantime.
I think it might work if you're building the llvm libs as shared libs, maybe. (On the other hand I do remember even more of such issues crop up if building in such a config.) I pushed a fix that fixes it for me anyway.
Thanks. I think it may be some difference from whether LLVM_TARGETS_TO_BUILD is specified or not.
I've removed the test in 098aea95e92e0cae53959737bf3520dc85b1b888 as it's still failing on a PPC bot. I will look into reinstating it.