[PATCH] D49336: [x86/SLH] Teach speculative load hardening to correctly harden the indices used by AVX2 and AVX-512 gather instructions.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 15 17:56:37 PDT 2018


craig.topper added inline comments.


================
Comment at: llvm/lib/Target/X86/X86InstrAVX512.td:9591
                        RegisterClass KRC, X86MemOperand memop> {
-  let Predicates = [HasPFI], hasSideEffects = 1 in
+  let Predicates = [HasPFI], mayLoad = 1, hasSideEffects = 1 in
   def m  : AVX5128I<opc, F, (outs), (ins KRC:$mask, memop:$src),
----------------
chandlerc wrote:
> craig.topper wrote:
> > I wonder if this should be mayLoad=1, mayStore =1, hasSideEffects = 0. That's what we use for other prefetch instructions.
> You tell me. I'm happy with whatever you think makes sense here really.
Yeah lets go with mayLoad=1 mayStore=1. I think that's what we would have inferred based on how the intrinsic is defined.


Repository:
  rL LLVM

https://reviews.llvm.org/D49336





More information about the llvm-commits mailing list