yonghong-song added inline comments.

================
Comment at: llvm/lib/Target/BPF/BPFMIChecking.cpp:199
+      unsigned newOpcode;
+      switch(MI.getOpcode()) {
+      case BPF::XFADDW32: newOpcode = BPF::XADDW32; break;
----------------
ast wrote:
> With this logic in place Andrii has a point. There is no need for -mcpu=v4 
> flag.
> The builtins will produce new insns and it will be up to kernel to accept 
> them or not.
will make the change (removing -mcpu=v4).


================
Comment at: llvm/lib/Target/BPF/BPFMIChecking.cpp:207
+      case BPF::XFORW32: newOpcode = BPF::XORW32; break;
+      default: newOpcode = BPF::XORD; break;
+      }
----------------
ast wrote:
> The default is error prone. Why not to check for XFORD explicitly and default 
> to fatal_error?
Yes, we can do this although theoretically default fatal_error should never 
happen.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72184

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to