jcranmer-intel wrote:

This is the AsmWriter side of https://github.com/llvm/llvm-project/pull/190641 
(I haven't got the hang of stacked PRs yet, sorry).

Because touching floating-point literal output syntax affects, uh, *a few* 
tests, the changes are necessarily massive. To that end, I ended up using a 
script (full disclosure: AI was used to write said script) to automate most of 
the changes. This script may be found at 
https://gist.github.com/jcranmer-intel/d279296ad91884c98b77fb23a9112a5a, which 
I suspect most downstream developers will find quite helpful for automating 
their own downstream tests.

I've structured the changes so that all of the files that were automatically 
converted by script are collected into a single commit, so that you can ignore 
looking at that change to get a much more manageable review diff. The test 
changes which were *not* automatically converted are kept as part of the main 
AsmWriter commit, the particular changes I want to call out are:

- Some of the clang tests for `long double` output actually simplify a bit with 
the changes, because the strings are much more similar. Although the default 
`snan` pattern we use sets the highest bit, so that value does differ from all 
of the different possible `long double` types in LLVM IR.
- There are several constant-folding tests for imprecise math functions, which 
were checked using only a prefix of the double. For `double` values, it was 
easy to map those changes to the new `f0x` syntax, but `float` values, I 
instead chose a uniform policy of matching the first 7 hexadecimal digits of 
the `f0x` syntax.

https://github.com/llvm/llvm-project/pull/190649
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to