[PATCH] D147541: [X86] Add InstFixup for masked `unpck{l|h}pd` -> masked `shufpd`

Serguei Katkov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 7 01:52:35 PDT 2023


skatkov added inline comments.


================
Comment at: llvm/lib/Target/X86/X86FixupInstTuning.cpp:157
 
   // `vunpcklpd/vmovlhps r, r` -> `vshufps r, r, 0x44`
   // `vunpckhpd/vmovlhps r, r` -> `vshufps r, r, 0xee`
----------------
Hello Noah, we've got downstream mis-compile on fuzzer testing on this patch.
Specifically reverting constants 0x00 -> 0x44 and 0xFF -> 0xee fixes the issue.

While we do not have IR reproducer for this problem at the moment, may be you would be able to detect the problem from source code?
At least I see that this comment states that for r,r case we should use old constants and for r,r,k new ones.
However it looks like the patch updates more cases. Is it correct?
It just is wild guess as I'm not familiar with this code.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D147541/new/

https://reviews.llvm.org/D147541



More information about the llvm-commits mailing list