[PATCH] D137991: [NVPTX] Emit pragma nounroll for llvm.loop.unroll.count=1
Artem Belevich via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 14 15:31:22 PST 2022
tra accepted this revision.
tra added a comment.
This revision is now accepted and ready to land.
LGTM with a nit.
================
Comment at: llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp:432-436
+ uint64_t Count =
+ mdconst::extract<ConstantInt>(UnrollCountMD->getOperand(1))
+ ->getZExtValue();
+ if (Count == 1)
+ return true;
----------------
This all can be folded directly into
`if (mdconst::extract<ConstantInt>(UnrollCountMD->getOperand(1))->getZExtValue() == 1) return true;`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137991/new/
https://reviews.llvm.org/D137991
More information about the llvm-commits
mailing list