Details
- Reviewers
craig.topper spatel RKSimon
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
What's the benefit of this? We already turn KORTEST+KAND into KTEST at the end of isel. I was trying to favor masked compares instead of keeping to registers alive into the ktest. The patch for that was here https://reviews.llvm.org/D56246
I agree that masked compare instructions are an important code density optimization. That being said, over reliance on this optimization can decrease overall instruction parallelism due to over-serialization of the instruction stream. If we can trust Agner Fog's data, the AVX512 comparison instructions have 3 cycle latency and a throughput of 1 instruction per cycle on SKX (and later), and 2 cycle latency and 2 instructions/cycle on KNL (and later). Therefore code before this change would needlessly serialize comparison instructions when they could run in parallel.