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.
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.