diff options
author | Roman Lebedev <lebedev.ri@gmail.com> | 2022-12-17 05:13:30 +0300 |
---|---|---|
committer | Roman Lebedev <lebedev.ri@gmail.com> | 2022-12-17 05:18:54 +0300 |
commit | 428f36401b1b695fd501ebfdc8773bed8ced8d4e (patch) | |
tree | e00e0a0a398e6b4e3ca413d083086d187e05af41 /clang/lib/Lex/ModuleMap.cpp | |
parent | 07ecdd9b1a8af51f07d5f4dfe46845c801482a39 (diff) | |
download | llvm-428f36401b1b695fd501ebfdc8773bed8ced8d4e.zip llvm-428f36401b1b695fd501ebfdc8773bed8ced8d4e.tar.gz llvm-428f36401b1b695fd501ebfdc8773bed8ced8d4e.tar.bz2 |
Reland "[SimplifyCFG] `FoldBranchToCommonDest()`: deal with mismatched IV's in PHI's in common successor block"
This reverts commit 37b8f09a4b61bf9bf9d0b9017d790c8b82be2e17,
and returns commit 1bd0b82e508d049efdb07f4f8a342f35818df341.
The miscompile was in InstCombine, and it has been addressed.
This tries to approach the problem noted by @arsenm:
terrible codegen for `__builtin_fpclassify()`:
https://godbolt.org/z/388zqdE37
Just because the PHI in the common successor happens to have different
incoming values for these two blocks, doesn't mean we have to give up.
It's quite easy to deal with this, we just need to produce a select:
https://alive2.llvm.org/ce/z/000srb
Now, the cost model for this transform is rather overly strict,
so this will basically never fire. We tally all (over all preds)
the selects needed to the NumBonusInsts
Differential Revision: https://reviews.llvm.org/D139275
Diffstat (limited to 'clang/lib/Lex/ModuleMap.cpp')
0 files changed, 0 insertions, 0 deletions