This is an archive of the discontinued LLVM Phabricator instance.

[NVPTX] Emit pragma nounroll for llvm.loop.unroll.count=1
ClosedPublic

Authored by slydiman on Nov 14 2022, 3:13 PM.

Details

Summary

Emit pragma nounroll for llvm.loop.unroll.count=1 (#pragma unroll 1).

Diff Detail

Event Timeline

slydiman created this revision.Nov 14 2022, 3:13 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 14 2022, 3:13 PM
slydiman requested review of this revision.Nov 14 2022, 3:13 PM
tra accepted this revision.Nov 14 2022, 3:31 PM

LGTM with a nit.

llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
432–436

This all can be folded directly into
if (mdconst::extract<ConstantInt>(UnrollCountMD->getOperand(1))->getZExtValue() == 1) return true;

This revision is now accepted and ready to land.Nov 14 2022, 3:31 PM
slydiman updated this revision to Diff 475300.Nov 14 2022, 3:38 PM
This revision was landed with ongoing or failed builds.Nov 14 2022, 4:30 PM
This revision was automatically updated to reflect the committed changes.