llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

[mc] vmcnt() expcnt() lgkmcnt() helpers to check that value fits into appropriate field

Open llvmbot opened this issue 9 years ago • 5 comments

Bugzilla Link 32711
Resolution FIXED
Resolved on Jun 07, 2017 09:15
Version trunk
OS Linux
Reporter LLVM Bugzilla Contributor
CC @atamazov

Extended Description

vmcnt() expcnt() lgkmcnt() helpers that are used to construct immediate for s_waitcnt instruction does not check that provided value fits into appropriate fields. Example:

s_waitcnt vmcnt(666)

It's better to produce an error rather than silently truncate values. Also we would like to see additional set of helpers (vmcnt_sat() expcnt_sat() lgkmcnt_sat()) which would produce saturated output.

Note that allowable ranges differs on gfx8 and gfx9 hardware.

llvmbot avatar Apr 19 '17 15:04 llvmbot

Closed by commit r304922

dpreobra avatar Jun 07 '17 16:06 dpreobra

The "failed parsing operand" error message is a bit inappropriate. The syntax is correct, so there should be no parsing problems. Re-opening.

  • LOW PRIORITY *

atamazov avatar Apr 26 '17 18:04 atamazov

Closed by commit r301439

dpreobra avatar Apr 26 '17 18:04 dpreobra

Fix sent out for review: https://reviews.llvm.org/D32546

dpreobra avatar Apr 26 '17 17:04 dpreobra

assigned to @dpreobra

llvmbot avatar Apr 19 '17 15:04 llvmbot