[PATCH] D123883: [BPF] Fix a bug in BPFMISimplifyPatchable pass

Alexei Starovoitov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 19 10:31:35 PDT 2022


ast added inline comments.


================
Comment at: llvm/lib/Target/BPF/BPFMISimplifyPatchable.cpp:236
   unsigned Opcode = Inst->getOpcode();
+  if (Opcode == BPF::LDD || Opcode == BPF::LDW || Opcode == BPF::LDH ||
+      Opcode == BPF::LDB || Opcode == BPF::LDW32 || Opcode == BPF::LDH32 ||
----------------
why gate only loads here?
The hunk below will apply to loads only anyway,
so this check looks unnecessary.
If both filter_loads checks (here and line 267) are necessary may be combine them into a helper function?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D123883



More information about the llvm-commits mailing list