Added tests for it, tweaked the expected basic blocks/values since the optimiser outputs different code
Changed the LLVM 17 compatibility test from a textual IR file to a bitcode file: bitcode files have forward compatibility, but the textual IR does not. Since it referenced the webkit_jscc calling convention, which was removed in LLVM 18, this was breaking the test
Removed various constant expressions that have been removed from the IR
I think the testing code/harness could use some tweaks: right now updating to a new LLVM version means potentially a lot of churn depending on if the optimiser changed. It is good to know that it can read bitcode files generated by newer versions of Clang, but right now the tests are a bit fragile. Not sure if other folks have thoughts on it
There are a lot of new APIs in LLVM 18, e.g. support for fast math flags and inline assembly. This PR doesn't add them, but I can make follow-up PRs once this lands
The issue with LLVMGetOrdering (in https://github.com/cdisselkoen/llvm-ir/issues/44) was fixed, so I was hoping that'd mean we could run the tests in debug mode. However, LLVM 18 also introduced a new issue with atomicrmw instructions that caused a similar crash when running the tests in debug mode. That should now be fixed come LLVM 19, and I'll update the issue with more details
webkit_jscc
calling convention, which was removed in LLVM 18, this was breaking the testRemoved various constant expressions that have been removed from the IR
LLVM Release notes: https://releases.llvm.org/18.1.0/docs/ReleaseNotes.html
A couple more things to note:
LLVMGetOrdering
(in https://github.com/cdisselkoen/llvm-ir/issues/44) was fixed, so I was hoping that'd mean we could run the tests in debug mode. However, LLVM 18 also introduced a new issue withatomicrmw
instructions that caused a similar crash when running the tests in debug mode. That should now be fixed come LLVM 19, and I'll update the issue with more details