[llvm-dev] Possible missing x86 JCC rules in the backend (original) (raw)

Matteo Favaro via llvm-dev llvm-dev at lists.llvm.org
Wed Jul 29 09:05:03 PDT 2020


Hi,

I was trying to verify if it's possible to generate all the possible x86 conditional jumps from Clang, but I didn't manage to obtain 3 jumps: JA/JNA, JL/JGE, JG/JLE

This is an example illustrating the flags calculation (hopefully correct) and the conditional jump generation: https://godbolt.org/z/a13qPa. I know these jumps are not common and that the example is weird, but I still think they should be foldable.

My assumption is that there are no backend rules to fold the generated patterns (including Jcc and SETcc instruction) into a single conditional jump instruction, but maybe I'm just missing a command line argument.

Am I missing something? If the rules are missing, what would it be the best place to implement them?

Thanks, Matteo -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200729/87bba743/attachment.html>



More information about the llvm-dev mailing list