[SR-11640] Multiplying doubles from struct #54051
Labels
CodeGen
compiler
The Swift compiler in itself
improvement
performance
SILOptimizer
Area → compiler: SIL optimization passes
Additional Detail from JIRA
md5: 833dd33d195d879e7d8fc3c9618b65e2
Issue Description:
The following generates 9 different `fmul` instructions. It should only generate 3. It also generates 31 `getelementptr` instructions when it certainly doesn't need that many, and theoretically could only generate 4.
An equivalent program in C++ takes about 1/4th of the time to run. Here is a comparison of the codegen from swift and clang.
If others agree this is an issue, I will start working on a patch to try to resolve it.
The text was updated successfully, but these errors were encountered: