[PATCH] D111500: [InstSimplify] Simplify intrinsic comparisons with domain knoweldge

Artem Belevich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 11 11:59:57 PDT 2021


tra added inline comments.


================
Comment at: llvm/lib/Analysis/InstructionSimplify.cpp:609
+  // fold %cmp = icmp slt i32 %tid, %ntid to true.
+  if (Inst0->getIntrinsicID() == Intrinsic::nvvm_read_ptx_sreg_tid_x &&
+      Inst1->getIntrinsicID() == Intrinsic::nvvm_read_ptx_sreg_ntid_x)
----------------
What if LLVM has been compiled without NVPTX back-end? I'm not sure that NVVM intrinsics will be available then.

Perhaps we should re-visit enabling NVVMIntrRange.cpp pass, again. This should make it possible for LLVM to figure this optimization, and more.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111500



More information about the llvm-commits mailing list