<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/test/FileCheck/numeric-expression.txt, branch users/nico/python-2</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[FileCheck, 3/4] Allow AP value for numeric expressions</title>
<updated>2023-08-07T13:48:48+00:00</updated>
<author>
<name>Thomas Preud'homme</name>
<email>thomas.preudhomme@arm.com</email>
</author>
<published>2023-08-07T08:37:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0726cb00471850ead0835e5d3806c7aef5bb0b21'/>
<id>0726cb00471850ead0835e5d3806c7aef5bb0b21</id>
<content type='text'>
Use APInt to represent numeric variables and expressions, therefore
removing overflow concerns. Only remains underflow when the format of an
expression is unsigned (incl. hex values) but the result is negative.
Note that this can only happen when substituting an expression, not when
capturing since the regex used to capture unsigned value will not include
minus sign, hence all the code removal for match propagation testing.
This is what this patch implement.

Reviewed By: arichardson

Differential Revision: https://reviews.llvm.org/D150880
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use APInt to represent numeric variables and expressions, therefore
removing overflow concerns. Only remains underflow when the format of an
expression is unsigned (incl. hex values) but the result is negative.
Note that this can only happen when substituting an expression, not when
capturing since the regex used to capture unsigned value will not include
minus sign, hence all the code removal for match propagation testing.
This is what this patch implement.

Reviewed By: arichardson

Differential Revision: https://reviews.llvm.org/D150880
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix PR46880: Fail CHECK-NOT with undefined variable</title>
<updated>2021-04-20T13:42:46+00:00</updated>
<author>
<name>Thomas Preud'homme</name>
<email>thomasp@graphcore.ai</email>
</author>
<published>2020-08-28T10:30:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=fd941036bf2494cfbd2749f2f179733cbe9e2eb4'/>
<id>fd941036bf2494cfbd2749f2f179733cbe9e2eb4</id>
<content type='text'>
Currently a CHECK-NOT directive succeeds whenever the corresponding
match fails. However match can fail due to an error rather than a lack
of match, for instance if a variable is undefined. This commit makes match
error a failure for CHECK-NOT.

Reviewed By: jdenny

Differential Revision: https://reviews.llvm.org/D86222
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently a CHECK-NOT directive succeeds whenever the corresponding
match fails. However match can fail due to an error rather than a lack
of match, for instance if a variable is undefined. This commit makes match
error a failure for CHECK-NOT.

Reviewed By: jdenny

Differential Revision: https://reviews.llvm.org/D86222
</pre>
</div>
</content>
</entry>
<entry>
<title>[FileCheck] Add support for hex alternate form in FileCheck</title>
<updated>2021-03-12T18:14:17+00:00</updated>
<author>
<name>Thomas Preud'homme</name>
<email>thomasp@graphcore.ai</email>
</author>
<published>2020-06-11T15:14:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f9e2a62cc594c96194908a3ac4804caa07f86ba6'/>
<id>f9e2a62cc594c96194908a3ac4804caa07f86ba6</id>
<content type='text'>
Add printf-style alternate form flag to prefix hex number with 0x when
present. This works on both empty numeric expression (e.g. variable
definition from input) and when matching a numeric expression. The
syntax is as follows:

[[#%#&lt;precision specifier&gt;&lt;format specifier&gt;, ...]

where &lt;precision specifier&gt; and &lt;format specifier&gt; are optional and ...
can be a variable definition or not with an empty expression or not.

This feature was requested in https://reviews.llvm.org/D81144#2075532
for llvm/test/MC/ELF/gen-dwarf64.s

Reviewed By: jdenny

Differential Revision: https://reviews.llvm.org/D97845
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add printf-style alternate form flag to prefix hex number with 0x when
present. This works on both empty numeric expression (e.g. variable
definition from input) and when matching a numeric expression. The
syntax is as follows:

[[#%#&lt;precision specifier&gt;&lt;format specifier&gt;, ...]

where &lt;precision specifier&gt; and &lt;format specifier&gt; are optional and ...
can be a variable definition or not with an empty expression or not.

This feature was requested in https://reviews.llvm.org/D81144#2075532
for llvm/test/MC/ELF/gen-dwarf64.s

Reviewed By: jdenny

Differential Revision: https://reviews.llvm.org/D97845
</pre>
</div>
</content>
</entry>
<entry>
<title>[FileCheck] Do not skip end of line in diagnostics</title>
<updated>2021-03-03T08:20:39+00:00</updated>
<author>
<name>Thomas Preud'homme</name>
<email>thomasp@graphcore.ai</email>
</author>
<published>2020-12-15T00:58:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=09c35739035e23279e9369b8bf048288781a3d60'/>
<id>09c35739035e23279e9369b8bf048288781a3d60</id>
<content type='text'>
When commit da108b4ed4e6e7267701e76d5fd3b87609c9ab77 introduced
the CHECK-NEXT directive, it added logic to skip to the next line when
printing a diagnostic if the current matching position is at the end of
a line. This was fine while FileCheck did not support regular expression
but since it does now it can be confusing when the pattern to match
starts with the expectation of a newline (e.g. CHECK-NEXT: {{\n}}foo).
It is also inconsistent with the column information in the diagnostic
which does point to the end of line.

This commit removes this logic altogether, such that failure to match
diagnostic for such cases would show the end of line and be consistent
with the column information. The commit also adapts all existing
testcases accordingly.

Note to reviewers: An alternative approach would be to restrict the code
to only skip to the next line if the first character of the pattern is
known not to match a whitespace-like character. This would respect the
original intent but keep the inconsistency in terms of column info and
requires more code. I've only chosen this current approach by laziness
and would be happy to restrict the logic instead.

Reviewed By: jdenny, jhenderson

Differential Revision: https://reviews.llvm.org/D93341
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When commit da108b4ed4e6e7267701e76d5fd3b87609c9ab77 introduced
the CHECK-NEXT directive, it added logic to skip to the next line when
printing a diagnostic if the current matching position is at the end of
a line. This was fine while FileCheck did not support regular expression
but since it does now it can be confusing when the pattern to match
starts with the expectation of a newline (e.g. CHECK-NEXT: {{\n}}foo).
It is also inconsistent with the column information in the diagnostic
which does point to the end of line.

This commit removes this logic altogether, such that failure to match
diagnostic for such cases would show the end of line and be consistent
with the column information. The commit also adapts all existing
testcases accordingly.

Note to reviewers: An alternative approach would be to restrict the code
to only skip to the next line if the first character of the pattern is
known not to match a whitespace-like character. This would respect the
original intent but keep the inconsistency in terms of column info and
requires more code. I've only chosen this current approach by laziness
and would be happy to restrict the logic instead.

Reviewed By: jdenny, jhenderson

Differential Revision: https://reviews.llvm.org/D93341
</pre>
</div>
</content>
</entry>
<entry>
<title>[Test][FileCheck] Fix use of undef var</title>
<updated>2021-01-09T10:45:00+00:00</updated>
<author>
<name>Thomas Preud'homme</name>
<email>thomasp@graphcore.ai</email>
</author>
<published>2020-08-20T19:41:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c0cea2d9b8ae4dc47f7737e47a621ddcb9cb57cf'/>
<id>c0cea2d9b8ae4dc47f7737e47a621ddcb9cb57cf</id>
<content type='text'>
The test related to directives with prefix NUMEXPR-CONSTRAINT-NOMATCH
refers to the numeric variable UNSI which is defined by a directive with
prefix CHECK not enabled on the lit command-line. Rather than adding the
prefix CHECK to the lit command-line, this commit defined variable UNSI
in a new NUMEXPR-CONSTRAINT-NOMATCH prefixed directive. The directive
needs to contain more than just the variable otherwise the error message
from FileCheck is about the wrong line being matched.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D93346
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The test related to directives with prefix NUMEXPR-CONSTRAINT-NOMATCH
refers to the numeric variable UNSI which is defined by a directive with
prefix CHECK not enabled on the lit command-line. Rather than adding the
prefix CHECK to the lit command-line, this commit defined variable UNSI
in a new NUMEXPR-CONSTRAINT-NOMATCH prefixed directive. The directive
needs to contain more than just the variable otherwise the error message
from FileCheck is about the wrong line being matched.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D93346
</pre>
</div>
</content>
</entry>
<entry>
<title>[FileCheck] Add precision to format specifier</title>
<updated>2020-08-30T18:40:57+00:00</updated>
<author>
<name>Thomas Preud'homme</name>
<email>thomasp@graphcore.ai</email>
</author>
<published>2020-06-11T15:14:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=998709b7d553e89c4ff89725d3fa646468b7b437'/>
<id>998709b7d553e89c4ff89725d3fa646468b7b437</id>
<content type='text'>
Add printf-style precision specifier to pad numbers to a given number of
digits when matching them if the value is smaller than the given
precision. This works on both empty numeric expression (e.g. variable
definition from input) and when matching a numeric expression. The
syntax is as follows:

[[#%.&lt;precision&gt;&lt;format specifier&gt;, ...]

where &lt;format specifier&gt; is optional and ... can be a variable
definition or not with an empty expression or not. In the absence of a
precision specifier, a variable definition will accept leading zeros.

Reviewed By: jhenderson, grimar

Differential Revision: https://reviews.llvm.org/D81667
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add printf-style precision specifier to pad numbers to a given number of
digits when matching them if the value is smaller than the given
precision. This works on both empty numeric expression (e.g. variable
definition from input) and when matching a numeric expression. The
syntax is as follows:

[[#%.&lt;precision&gt;&lt;format specifier&gt;, ...]

where &lt;format specifier&gt; is optional and ... can be a variable
definition or not with an empty expression or not. In the absence of a
precision specifier, a variable definition will accept leading zeros.

Reviewed By: jhenderson, grimar

Differential Revision: https://reviews.llvm.org/D81667
</pre>
</div>
</content>
</entry>
<entry>
<title>[FileCheck] Add missing %ProtectFileCheckOutput to FileCheck tests</title>
<updated>2020-06-10T16:40:35+00:00</updated>
<author>
<name>Joel E. Denny</name>
<email>jdenny.ornl@gmail.com</email>
</author>
<published>2020-06-10T14:22:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4b1b09fcc0d75ad4d5559f0b86049627174db585'/>
<id>4b1b09fcc0d75ad4d5559f0b86049627174db585</id>
<content type='text'>
This is a continuation of D65121 (committed at f471eb8e99b5).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a continuation of D65121 (committed at f471eb8e99b5).
</pre>
</div>
</content>
</entry>
<entry>
<title>FileCheck [11/12]: Add matching constraint specification</title>
<updated>2020-06-10T14:56:10+00:00</updated>
<author>
<name>Thomas Preud'homme</name>
<email>thomasp@graphcore.ai</email>
</author>
<published>2019-07-17T15:15:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=47934c7cf9f6c18e21a34f9324680652214f771e'/>
<id>47934c7cf9f6c18e21a34f9324680652214f771e</id>
<content type='text'>
This patch is part of a patch series to add support for FileCheck
numeric expressions. This specific patch adds support for specifying the
matching constraint for a numeric expression, ie. how the value being
matched should relate to the numeric expression.

This commit only adds the equality constraint where the numeric value
matched must be equal to the numeric expression. It is the default
matching constraint used when not specified. It is added to provision
other matching constraint (e.g. inequality relations).

Copyright:
    - Linaro (changes up to diff 183612 of revision D55940)
    - GraphCore (changes in later versions of revision D55940 and
                 in new revision created off D55940)

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D60391
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch is part of a patch series to add support for FileCheck
numeric expressions. This specific patch adds support for specifying the
matching constraint for a numeric expression, ie. how the value being
matched should relate to the numeric expression.

This commit only adds the equality constraint where the numeric value
matched must be equal to the numeric expression. It is the default
matching constraint used when not specified. It is added to provision
other matching constraint (e.g. inequality relations).

Copyright:
    - Linaro (changes up to diff 183612 of revision D55940)
    - GraphCore (changes in later versions of revision D55940 and
                 in new revision created off D55940)

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D60391
</pre>
</div>
</content>
</entry>
<entry>
<title>[FileCheck] Add function call support to numerical expressions.</title>
<updated>2020-06-10T09:42:00+00:00</updated>
<author>
<name>Paul Walker</name>
<email>paul.walker@arm.com</email>
</author>
<published>2020-05-14T10:32:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8fd2270370244f0e93b4fd9ac4e13473f3cd7dd7'/>
<id>8fd2270370244f0e93b4fd9ac4e13473f3cd7dd7</id>
<content type='text'>
This patch extends numerical expressions to allow calls to
predefined functions. These calls can be combined with the
existing numerical operators, which includes nesting calls.

The call syntax is:

  &lt;func&gt;(&lt;args&gt;)

Where &lt;func&gt; is a predefined string literal, currently limited to
one of add, max, min and sub. &lt;arg&gt; is a comma seperated list of
numerical expressions.

Subscribers: arichardson, hiraditya, thopre, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D79936
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch extends numerical expressions to allow calls to
predefined functions. These calls can be combined with the
existing numerical operators, which includes nesting calls.

The call syntax is:

  &lt;func&gt;(&lt;args&gt;)

Where &lt;func&gt; is a predefined string literal, currently limited to
one of add, max, min and sub. &lt;arg&gt; is a comma seperated list of
numerical expressions.

Subscribers: arichardson, hiraditya, thopre, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D79936
</pre>
</div>
</content>
</entry>
<entry>
<title>FileCheck [10/12]: Add support for signed numeric values</title>
<updated>2020-05-28T09:44:21+00:00</updated>
<author>
<name>Thomas Preud'homme</name>
<email>thomasp@graphcore.ai</email>
</author>
<published>2019-03-05T23:20:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=23ac16cf9bd4cc0bb434efcf6385baf083a2ff7b'/>
<id>23ac16cf9bd4cc0bb434efcf6385baf083a2ff7b</id>
<content type='text'>
Summary:
This patch is part of a patch series to add support for FileCheck
numeric expressions. This specific patch adds support signed numeric
values, thus allowing negative numeric values.

As such, the patch adds a new class to represent a signed or unsigned
value and add the logic for type promotion and type conversion in
numeric expression mixing signed and unsigned values. It also adds
the %d format specifier to represent signed value.

Finally, it also adds underflow and overflow detection when performing a
binary operation.

Copyright:
    - Linaro (changes up to diff 183612 of revision D55940)
    - GraphCore (changes in later versions of revision D55940 and
                 in new revision created off D55940)

Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson

Reviewed By: jhenderson, arichardson

Subscribers: MaskRay, hiraditya, llvm-commits, probinson, dblaikie, grimar, arichardson, kristina, hfinkel, rogfer01, JonChesterfield

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D60390
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
This patch is part of a patch series to add support for FileCheck
numeric expressions. This specific patch adds support signed numeric
values, thus allowing negative numeric values.

As such, the patch adds a new class to represent a signed or unsigned
value and add the logic for type promotion and type conversion in
numeric expression mixing signed and unsigned values. It also adds
the %d format specifier to represent signed value.

Finally, it also adds underflow and overflow detection when performing a
binary operation.

Copyright:
    - Linaro (changes up to diff 183612 of revision D55940)
    - GraphCore (changes in later versions of revision D55940 and
                 in new revision created off D55940)

Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson

Reviewed By: jhenderson, arichardson

Subscribers: MaskRay, hiraditya, llvm-commits, probinson, dblaikie, grimar, arichardson, kristina, hfinkel, rogfer01, JonChesterfield

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D60390
</pre>
</div>
</content>
</entry>
</feed>
