Page MenuHomePhabricator

thopre (Thomas Preud'homme)
User

Projects

User does not belong to any projects.

User Details

User Since
Nov 22 2017, 10:31 AM (69 w, 18 h)

Recent Activity

Mon, Mar 11

thopre added a comment to D58784: [FileCheck]Remove assertions that prevent matching an empty string at file start before CHECK-NEXT/SAME.

I think CHECK-FIRSTLINE: {{^$}} would be a natural consequence of not wanting to change the permitted uses of other check directives, although I definitely agree it's not ideal. I'm not sure how else it would work if CHECK-SAME remained illegal as the first CHECK, and if we don't want to change CHECK-EMPTY's semantics. I suppose we could special-case CHECK-EMPTY's behaviour when it is the first check in the file to match the first line. This would certainly be intuitive, but it means that CHECK-EMPTY would no longer mean the same as CHECK-NEXT (except matching an empty line) in all cases. Thus CHECK-EMPTY becomes "Checks if the NEXT line in the input is completely empty. If it is the first specified CHECK, it checks that the first line matches is empty." I think this would be nicer than a new directive for this specific case, or to force regular expressions etc.

Mon, Mar 11, 3:23 AM · Restricted Project

Thu, Mar 7

thopre added a comment to D58784: [FileCheck]Remove assertions that prevent matching an empty string at file start before CHECK-NEXT/SAME.

This all lets me keep thinking that a CHECK-SAME as the first directive would naturally look for a match on the first line of input (i.e., the "same" line as the implicit initial label), and an initial CHECK-NEXT would (by virtue of how it is defined relative to the model, not because it's inherently useful) match on the second line of input.

Thu, Mar 7, 1:19 AM · Restricted Project

Fri, Mar 1

thopre added a comment to D58784: [FileCheck]Remove assertions that prevent matching an empty string at file start before CHECK-NEXT/SAME.

If we are talking about matching a specific line (in this case the first line), I wonder if we could not extend the syntax of directives to accept a line number, e.g. CHECK-EMPTY-L1. Or if we think only the first line deserve to be checked explicitely simply a CHECK-FIRST. The fact that we are arguing about what would the meaning of CHECK-SAME and CHECK-NEXT on the first line be suggests that it would confuse lots of users. After all you are the most familiar people with that piece of software.

Fri, Mar 1, 1:26 AM · Restricted Project

Thu, Feb 28

thopre accepted D58784: [FileCheck]Remove assertions that prevent matching an empty string at file start before CHECK-NEXT/SAME.

I think the asserts should stay, they ensure that the call to CountNumNewlinesBetween is counting the newline in the right segment of text.

I'm not sure I follow how the asserts ensure this? All it shows is that the current buffer pointer is not the same as the start of the memory block it is in, i.e. that it has moved forwards.

In any case I do not understand why the asserts search from the start of the buffer given that there is a CHECK before the CHECK-SAME and CHECK-NEXT in your examples. Could you detail a bit?

The Buffer contains the remainder of the text in the input following the previous match, or the entire text if it is the first match. For example, if the input string was abc and there was a CHECK: a first, Buffer contains bc, wheras CHECK: b would result in the Buffer just containing c. The problem is that the pattern CHECK: {{^$}} matches exactly 0 characters, thus the Buffer is the same before and after the match, and therefore the Buffer is still pointing at the start of the memory block.

Thu, Feb 28, 7:28 AM · Restricted Project
thopre added a comment to D58784: [FileCheck]Remove assertions that prevent matching an empty string at file start before CHECK-NEXT/SAME.

I think the asserts should stay, they ensure that the call to CountNumNewlinesBetween is counting the newline in the right segment of text. I'd rather add an extra condition to the assert "or it's first NEXT". In any case I do not understand why the asserts search from the start of the buffer given that there is a CHECK before the CHECK-SAME and CHECK-NEXT in your examples. Could you detail a bit?

Thu, Feb 28, 7:12 AM · Restricted Project

Feb 6 2019

thopre abandoned D57760: Fix defines.txt test failure on Windows targets.

Abandon it as issue has already been fixed.

Feb 6 2019, 2:25 AM · Restricted Project
thopre added a comment to D57760: Fix defines.txt test failure on Windows targets.

Someone beat me to it overnight and went for my initial approach. Is it worth a separate commit to stop testing for FileCheck's name in the error string as suggested or should I abandon this revision?

Feb 6 2019, 12:34 AM · Restricted Project
thopre updated the summary of D57760: Fix defines.txt test failure on Windows targets.
Feb 6 2019, 12:29 AM · Restricted Project
thopre updated the diff for D57760: Fix defines.txt test failure on Windows targets.

Remove program name from the string being checked for

Feb 6 2019, 12:28 AM · Restricted Project

Feb 5 2019

thopre added inline comments to D57760: Fix defines.txt test failure on Windows targets.
Feb 5 2019, 9:38 AM · Restricted Project
thopre created D57760: Fix defines.txt test failure on Windows targets.
Feb 5 2019, 9:16 AM · Restricted Project
thopre committed rGa5e233bf798e: Recommit: Detect incorrect FileCheck variable CLI definition (authored by thopre).
Recommit: Detect incorrect FileCheck variable CLI definition
Feb 5 2019, 6:18 AM
thopre committed rGf929a0f81b6f: Recommit: Add support for prefix-only CLI options (authored by thopre).
Recommit: Add support for prefix-only CLI options
Feb 5 2019, 6:18 AM
thopre committed rL353173: Recommit: Detect incorrect FileCheck variable CLI definition.
Recommit: Detect incorrect FileCheck variable CLI definition
Feb 5 2019, 6:17 AM
thopre committed rL353172: Recommit: Add support for prefix-only CLI options.
Recommit: Add support for prefix-only CLI options
Feb 5 2019, 6:17 AM
thopre abandoned D40368: [PATCH 2/2] Centralize info about spill areas in data structures.

No longer working for Arm. This would need to be rebased first if anybody picks it up.

Feb 5 2019, 3:40 AM · Restricted Project
thopre added a child revision for D40367: [PATCH 1/2] Consolidate link between registers and spill area: D40368: [PATCH 2/2] Centralize info about spill areas in data structures.
Feb 5 2019, 3:40 AM · Restricted Project
thopre added a parent revision for D40368: [PATCH 2/2] Centralize info about spill areas in data structures: D40367: [PATCH 1/2] Consolidate link between registers and spill area.
Feb 5 2019, 3:40 AM · Restricted Project
thopre abandoned D40367: [PATCH 1/2] Consolidate link between registers and spill area.

No longer working for Arm. This would need to be rebased first if anybody picks it up.

Feb 5 2019, 3:40 AM · Restricted Project
thopre abandoned D56789: FileCheck: Allow CHECK-{SAME,NEXT,EMPTY} after initial CHECK-DAG.

As suggested by Joel, I'll start a discussion on llvm-dev to solve the real issue.

Feb 5 2019, 3:37 AM · Restricted Project
thopre updated the summary of D49084: FileCheck: Add support for numeric variables and expressions.
Feb 5 2019, 3:31 AM · Restricted Project

Feb 4 2019

thopre accepted D57030: [CommandLine] Don't print empty sentinel values from EnumValN lists in help text.

LGTM. Thanks

Feb 4 2019, 3:29 AM · Restricted Project
thopre added a comment to D57030: [CommandLine] Don't print empty sentinel values from EnumValN lists in help text.

Forgot some nits about the description (please ignore if it doesn't end up in the commit message):

Feb 4 2019, 3:11 AM · Restricted Project
thopre added inline comments to D57030: [CommandLine] Don't print empty sentinel values from EnumValN lists in help text.
Feb 4 2019, 3:07 AM · Restricted Project
thopre added inline comments to D57030: [CommandLine] Don't print empty sentinel values from EnumValN lists in help text.
Feb 4 2019, 1:46 AM · Restricted Project

Jan 30 2019

thopre added a comment to D56789: FileCheck: Allow CHECK-{SAME,NEXT,EMPTY} after initial CHECK-DAG.

[SNIP]

Agreed, something like CHECK-DAG-NEXT would be better suited. The requirement of CHECK-DAG with CHECK-NEXT was mentioned to me by a coworker and I noticed the weird inconsistency regarding whether CHECK-DAG is the first check directives or not and thought I'd fix it. The behaviour we need is indeed reordering without any line not checked for in between using CHECK-DAG is not the right solution. So I guess the correct approach would be to error out on CHECK-DAG with CHECK-NEXT, CHECK-SAME or CHECK-EMPTY, probably with some flag to enable the old behavior while tests are updated.

Possibly so. Given that many of those existing cases were probably intending the stricter behavior, let's first create a better solution for the stricter behavior.

Regarding CHECK-DAG-NEXT, I wonder how it would interact with CHECK-DAG?

I think that any kind of CHECK-DAG* following a different kind of CHECK-DAG* would start a new block such that there's no reordering among blocks. Otherwise, the semantics become very unclear to me.

It seems intuitive that the first match in a CHECK-DAG-NEXT block would have to appear on the line after whatever match came before the block. However, if you don't want that behavior, then I'm not sure how you would express that.

Jan 30 2019, 3:06 PM · Restricted Project
thopre accepted D57030: [CommandLine] Don't print empty sentinel values from EnumValN lists in help text.

Splendid, thanks for addressing all my remarks and thanks ruiu for the excellent output formatting suggestion. LGTM.

Jan 30 2019, 1:32 PM · Restricted Project

Jan 29 2019

thopre added a comment to D57393: [InlineAsm][X86] Add backend support for X86 flag output parameters..

FYI: only reviewed the SelectionDAGBuilder parts.

Jan 29 2019, 2:57 PM · Restricted Project
thopre added inline comments to D57030: [CommandLine] Don't print empty sentinel values from EnumValN lists in help text.
Jan 29 2019, 6:48 AM · Restricted Project
thopre added inline comments to D57030: [CommandLine] Don't print empty sentinel values from EnumValN lists in help text.
Jan 29 2019, 6:30 AM · Restricted Project

Jan 27 2019

thopre committed rL352310: Revert "Add support for prefix-only CLI options".
Revert "Add support for prefix-only CLI options"
Jan 27 2019, 1:02 AM
thopre committed rL352309: Revert "Detect incorrect FileCheck variable CLI definition".
Revert "Detect incorrect FileCheck variable CLI definition"
Jan 27 2019, 1:02 AM
thopre committed rL352308: Revert "Fix defines.txt".
Revert "Fix defines.txt"
Jan 27 2019, 1:02 AM

Jan 25 2019

thopre updated the summary of D49084: FileCheck: Add support for numeric variables and expressions.
Jan 25 2019, 1:36 PM · Restricted Project
thopre added inline comments to D49084: FileCheck: Add support for numeric variables and expressions.
Jan 25 2019, 1:32 PM · Restricted Project
thopre updated the diff for D49084: FileCheck: Add support for numeric variables and expressions.

Besides typo and wording improvements:

Jan 25 2019, 1:32 PM · Restricted Project
thopre updated the summary of D56789: FileCheck: Allow CHECK-{SAME,NEXT,EMPTY} after initial CHECK-DAG.
Jan 25 2019, 1:30 PM · Restricted Project
thopre retitled D56789: FileCheck: Allow CHECK-{SAME,NEXT,EMPTY} after initial CHECK-DAG from Allow CHECK-SAME, NEXT and EMPTY after CHECK-DAG to FileCheck: Allow CHECK-{SAME,NEXT,EMPTY} after initial CHECK-DAG.
Jan 25 2019, 1:27 PM · Restricted Project
thopre updated the diff for D56789: FileCheck: Allow CHECK-{SAME,NEXT,EMPTY} after initial CHECK-DAG.

Fix typos and improve title

Jan 25 2019, 1:27 PM · Restricted Project
thopre added a comment to D56789: FileCheck: Allow CHECK-{SAME,NEXT,EMPTY} after initial CHECK-DAG.

Hi Thomas,

Thanks for working to clean up this area.

As I understand it, CHECK-NEXT, CHECK-SAME, and CHECK-EMPTY currently can appear after non-initial CHECK-DAG blocks, and this patch intends to permit them after initial CHECK-DAG blocks as well. I agree with Paul that the title should be adjusted to reflect that.

Jan 25 2019, 1:20 PM · Restricted Project

Jan 24 2019

thopre added a comment to D57030: [CommandLine] Don't print empty sentinel values from EnumValN lists in help text.

I found this file: llvm/unittests/Support/CommandLineTest.cpp

Maybe you can add a test for the new functionality to that file.

That's where I would test this, yes, but the function is all about printing to outs(), and I don't know of a way using LLVM's tools to test that. Can you (or anybody else) suggest anything?

I guess I could just put a test in "test/Other" which runs a tools with --help that prints the various forms available (although I don't think the "=<empty>" path is used anywhere currently).

Jan 24 2019, 7:01 AM · Restricted Project

Jan 23 2019

thopre added a comment to D57030: [CommandLine] Don't print empty sentinel values from EnumValN lists in help text.

I like this new version very much. I agree, <empty> is less likely to be confusing. One last nit: why do you check for the description being empty when deciding to skip an empty value for a ValueOptional option in the second block but not in the first block? Any reason for the inconsistency?

It wasn't intentional, but I think it is okay (although I could be persuaded to do something different). As things stand, an empty string with help text would produce something like this for a ValueOptional option:

-mhvx                                            - Enable Hexagon Vector eXtensions
 -mhvx=<value>                                    - Enable Hexagon Vector eXtensions
   =v60                                           -   Build for HVX v60
   =v62                                           -   Build for HVX v62
   =v65                                           -   Build for HVX v65
   =v66                                           -   Build for HVX v66
   =<empty>                                       -   Same as v66

We could instead suppress the =<empty> line always (even if it has a description), or we could always print the =<empty> line regardless of whether it has a description or not, I don't mind.

Jan 23 2019, 8:25 AM · Restricted Project
thopre added a comment to D56789: FileCheck: Allow CHECK-{SAME,NEXT,EMPTY} after initial CHECK-DAG.

Ping?

Jan 23 2019, 7:40 AM · Restricted Project
thopre added a comment to D57030: [CommandLine] Don't print empty sentinel values from EnumValN lists in help text.

I like this new version very much. I agree, <empty> is less likely to be confusing. One last nit: why do you check for the description being empty when deciding to skip an empty value for a ValueOptional option in the second block but not in the first block? Any reason for the inconsistency?

Jan 23 2019, 7:32 AM · Restricted Project
thopre added a comment to D57030: [CommandLine] Don't print empty sentinel values from EnumValN lists in help text.

Ideally I believe we should print out something like this for an option that takes an optional argument:

-mhvx                                            - Enable Hexagon Vector eXtensions
-mhvx=<value>                                    - Enable Hexagon Vector eXtensions
   =v60                                           -   Build for HVX v60
   =v62                                           -   Build for HVX v62
   =v65                                           -   Build for HVX v65
   =v66                                           -   Build for HVX v66

Do you think that's doable?

Jan 23 2019, 1:11 AM · Restricted Project

Jan 22 2019

thopre added a comment to D57030: [CommandLine] Don't print empty sentinel values from EnumValN lists in help text.

Thanks for the explanation. In that case I'd like to differentiate between the optional and non optional case.

  1. For optional omitting the line is probably fine, or perhaps put a [default] instead of empty equal sign.
  2. To handle the non optional case I think we should introduce single quotes after the equal sign to indicate that this is not an error but an empty value, ie. =''. Perhaps also put quote around other values for consistency.

    Does that make sense?

I'm afraid I'm not quite sure what you mean by the "optional and non optional case". Do you mean when ValueOptional is and is not used?

Jan 22 2019, 3:27 PM · Restricted Project
thopre added a comment to D57030: [CommandLine] Don't print empty sentinel values from EnumValN lists in help text.

Do such sentinel trigger if not passing the equal sign (ie. when using only "-mhvx" in the example you quote) or only with equal sign without a value (one has to use "-mhvx=" to select the option)?

If the former I think this change is fine. I would also suggest adding an early continue when only the description is empty on line 1683 to avoid the empty '-'.

But if the latter (one has to do "-mhvx=" to select the option) I'm not sure hiding the option is right since it is a value (albeit empty) people can use.

Assuming ValueOptional is specified, then yes, you don't need the equal sign. I've written up a table below of different input options versus their behaviour to clarify things:

Code--option--option=--option foo--option=foo
default, no sentinelnot allowednot allowedallowedallowed
default, sentinelnot allowedallowedallowedallowed
ValueOptional, no sentinelnot allowednot allowednot allowedallowed
ValueOptional, sentinelallowedallowednot allowedallowed
Jan 22 2019, 3:25 AM · Restricted Project

Jan 21 2019

thopre added inline comments to D57030: [CommandLine] Don't print empty sentinel values from EnumValN lists in help text.
Jan 21 2019, 2:52 PM · Restricted Project
thopre added a comment to D57030: [CommandLine] Don't print empty sentinel values from EnumValN lists in help text.

Do such sentinel trigger if not passing the equal sign (ie. when using only "-mhvx" in the example you quote) or only with equal sign without a value (one has to use "-mhvx=" to select the option)?

Jan 21 2019, 2:52 PM · Restricted Project

Jan 16 2019

thopre created D56789: FileCheck: Allow CHECK-{SAME,NEXT,EMPTY} after initial CHECK-DAG.
Jan 16 2019, 9:05 AM · Restricted Project

Jan 14 2019

thopre committed rL351042: Fix defines.txt.
Fix defines.txt
Jan 14 2019, 2:14 AM
thopre committed rL351039: Detect incorrect FileCheck variable CLI definition.
Detect incorrect FileCheck variable CLI definition
Jan 14 2019, 1:33 AM
thopre closed D55940: Detect incorrect FileCheck variable CLI definition.
Jan 14 2019, 1:33 AM
thopre committed rL351038: Add support for prefix-only CLI options.
Add support for prefix-only CLI options
Jan 14 2019, 1:33 AM
thopre closed D56549: Add support for prefix-only CLI options.
Jan 14 2019, 1:33 AM

Jan 12 2019

thopre updated the summary of D55940: Detect incorrect FileCheck variable CLI definition.
Jan 12 2019, 5:01 AM
thopre updated the summary of D56549: Add support for prefix-only CLI options.
Jan 12 2019, 4:44 AM

Jan 11 2019

thopre updated the summary of D55940: Detect incorrect FileCheck variable CLI definition.
Jan 11 2019, 5:13 AM

Jan 10 2019

thopre updated the diff for D56549: Add support for prefix-only CLI options.

Clarify what happens in LookupOption when failing to match an option.

Jan 10 2019, 8:24 AM
thopre updated the diff for D56549: Add support for prefix-only CLI options.

Fix comment in LookupOption for AlwaysPrefix early bail out

Jan 10 2019, 8:19 AM
thopre added a child revision for D56549: Add support for prefix-only CLI options: D55940: Detect incorrect FileCheck variable CLI definition.
Jan 10 2019, 7:49 AM
thopre added a parent revision for D55940: Detect incorrect FileCheck variable CLI definition: D56549: Add support for prefix-only CLI options.
Jan 10 2019, 7:49 AM
thopre updated the diff for D55940: Detect incorrect FileCheck variable CLI definition.

Take CommandLine option code into a separate patch

Jan 10 2019, 7:49 AM
thopre created D56549: Add support for prefix-only CLI options.
Jan 10 2019, 7:46 AM
thopre updated the summary of D55940: Detect incorrect FileCheck variable CLI definition.
Jan 10 2019, 2:54 AM
thopre added inline comments to D55940: Detect incorrect FileCheck variable CLI definition.
Jan 10 2019, 2:54 AM
thopre updated the diff for D55940: Detect incorrect FileCheck variable CLI definition.
  • Forbid AlwaysPrefix option to look for their value in following argument
  • Add unit tests for changes to CommandLine
Jan 10 2019, 2:53 AM

Dec 29 2018

thopre updated the diff for D55940: Detect incorrect FileCheck variable CLI definition.

Add AlwaysPrefix option formatting flag and define FileCheck's -D option with it.
Add detection of missing variable name.

Dec 29 2018, 3:37 PM

Dec 21 2018

thopre added a comment to D55940: Detect incorrect FileCheck variable CLI definition.

This will permit -DVALUE= (with no value) is that a supported usage?

I think it should be. You could have a string that sometimes appears and sometimes is excluded entirely.

It also permits -D=10 which I daresay doesn't mean anything.

Agreed.

Dec 21 2018, 3:12 AM
thopre added inline comments to D49084: FileCheck: Add support for numeric variables and expressions.
Dec 21 2018, 2:09 AM · Restricted Project

Dec 20 2018

thopre updated the diff for D49084: FileCheck: Add support for numeric variables and expressions.

Document how to set numeric variable with -D option

Dec 20 2018, 4:08 PM · Restricted Project
thopre added reviewers for D49084: FileCheck: Add support for numeric variables and expressions: jdenny, probinson, grimar, arichardson, rnk.
Dec 20 2018, 10:03 AM · Restricted Project
thopre added a parent revision for D49084: FileCheck: Add support for numeric variables and expressions: D55940: Detect incorrect FileCheck variable CLI definition.
Dec 20 2018, 9:58 AM · Restricted Project
thopre added a child revision for D55940: Detect incorrect FileCheck variable CLI definition: D49084: FileCheck: Add support for numeric variables and expressions.
Dec 20 2018, 9:58 AM
thopre retitled D49084: FileCheck: Add support for numeric variables and expressions from FileCheck: Add support for variable expressions to FileCheck: Add support for numeric variables and expressions.
Dec 20 2018, 9:54 AM · Restricted Project
thopre updated the diff for D49084: FileCheck: Add support for numeric variables and expressions.

FileCheck: Add support for numeric variables and expressions

Dec 20 2018, 9:51 AM · Restricted Project
thopre created D55940: Detect incorrect FileCheck variable CLI definition.
Dec 20 2018, 9:43 AM

Dec 12 2018

thopre accepted D55428: [Docs] Expand -fstack-protector and -fstack-protector-all info.

LGTM. Thanks!

Dec 12 2018, 2:12 AM · Restricted Project

Dec 11 2018

thopre added a comment to D49084: FileCheck: Add support for numeric variables and expressions.
In D49084#1203189, @rnk wrote:

FWIW I had a use case for this recently, and found it hadn't landed. Is there anything blocking that you need help with?

Dec 11 2018, 10:23 AM · Restricted Project
thopre added inline comments to D55428: [Docs] Expand -fstack-protector and -fstack-protector-all info.
Dec 11 2018, 5:16 AM · Restricted Project

Dec 10 2018

thopre added inline comments to D55428: [Docs] Expand -fstack-protector and -fstack-protector-all info.
Dec 10 2018, 3:50 AM · Restricted Project

Aug 14 2018

thopre added a comment to D50594: [analyzer] [NFC] Introduce separate targets for testing the analyzer: check-clang-analyzer and check-clang-analyzer-z3.

Hi George,

Aug 14 2018, 1:10 AM

Aug 8 2018

thopre closed D48434: Fix crash on inline asm with 64bit matching input in 32bit GPR.
Aug 8 2018, 2:42 AM
thopre committed rL339225: Support inline asm with multiple 64bit output in 32bit GPR.
Support inline asm with multiple 64bit output in 32bit GPR
Aug 8 2018, 2:36 AM
thopre closed D45437: Support inline asm with multiple 64bit output in 32bit GPR.
Aug 8 2018, 2:36 AM

Aug 7 2018

thopre updated the diff for D45437: Support inline asm with multiple 64bit output in 32bit GPR.
  • Change test for isSized() into assert
  • Add test for multiple return values with matching input
  • Rewrite hardfloat tests to return a struct to make register used predictable and not dependent on register allocator
Aug 7 2018, 6:43 AM
thopre added inline comments to D45437: Support inline asm with multiple 64bit output in 32bit GPR.
Aug 7 2018, 6:41 AM

Aug 3 2018

thopre added a comment to D45437: Support inline asm with multiple 64bit output in 32bit GPR.

Ping? This fix the bug reported in https://reviews.llvm.org/rL337903

Aug 3 2018, 7:41 AM
thopre added a comment to rL337903: Fix PR34170: Crash on inline asm with 64bit output in 32bit GPR.

It appears that this patch crashes llvm under some circumstances.

Reproduction:

test.cc:

float asmfunc(int a, int b) {
  float read_value;
  asm("" : "=r"(read_value), "=r"(a));
  return read_value;
}
int B_X;
void kFCNorm(int a, float b) {
  B_X = asmfunc(a, B_X) * b;
}
$ clang -S -O3 test.cc -o - `
...
clang-7: <redacted>/repo/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:4489: llvm::SDValue llvm::SelectionDAG::getNode(unsigned int, const llvm::SDLoc &, llvm::EVT, llvm::SDValue, llvm::SDValue, const llvm::SDNodeFlags): Assertion `VT.isFloatingPoint() && "This operator only applies to FP types!"' failed.

I can reproduce, thanks. I'll see if I can find a fix today and if not will revert it and its follow-up patch.

Aug 3 2018, 7:40 AM
thopre closed D45376: Fix PR34170: Crash on inline asm with 64bit output in 32bit GPR.

Fixed in trunk

Aug 3 2018, 2:24 AM
thopre added a comment to rL337903: Fix PR34170: Crash on inline asm with 64bit output in 32bit GPR.

It appears that this patch crashes llvm under some circumstances.

Reproduction:

test.cc:

float asmfunc(int a, int b) {
  float read_value;
  asm("" : "=r"(read_value), "=r"(a));
  return read_value;
}
int B_X;
void kFCNorm(int a, float b) {
  B_X = asmfunc(a, B_X) * b;
}
$ clang -S -O3 test.cc -o - `
...
clang-7: <redacted>/repo/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:4489: llvm::SDValue llvm::SelectionDAG::getNode(unsigned int, const llvm::SDLoc &, llvm::EVT, llvm::SDValue, llvm::SDValue, const llvm::SDNodeFlags): Assertion `VT.isFloatingPoint() && "This operator only applies to FP types!"' failed.
Aug 3 2018, 2:24 AM
thopre added an edge to rL338269: Reapply "Fix crash on inline asm with 64bit matching input in 32bit GPR": D48434: Fix crash on inline asm with 64bit matching input in 32bit GPR.
Aug 3 2018, 2:20 AM
thopre added an edge to rL338206: Fix crash on inline asm with 64bit matching input in 32bit GPR: D48434: Fix crash on inline asm with 64bit matching input in 32bit GPR.
Aug 3 2018, 2:20 AM
thopre added 2 commit(s) for D48434: Fix crash on inline asm with 64bit matching input in 32bit GPR: rL338269: Reapply "Fix crash on inline asm with 64bit matching input in 32bit GPR", rL338206: Fix crash on inline asm with 64bit matching input in 32bit GPR.
Aug 3 2018, 2:20 AM
thopre added 1 commit(s) for D45376: Fix PR34170: Crash on inline asm with 64bit output in 32bit GPR: rL337903: Fix PR34170: Crash on inline asm with 64bit output in 32bit GPR.
Aug 3 2018, 2:19 AM
thopre added an edge to rL337903: Fix PR34170: Crash on inline asm with 64bit output in 32bit GPR: D45376: Fix PR34170: Crash on inline asm with 64bit output in 32bit GPR.
Aug 3 2018, 2:19 AM

Jul 30 2018

thopre committed rL338269: Reapply "Fix crash on inline asm with 64bit matching input in 32bit GPR".
Reapply "Fix crash on inline asm with 64bit matching input in 32bit GPR"
Jul 30 2018, 9:49 AM
thopre committed rL338268: Fix uninitialized read in ARM's PrintAsmOperand.
Fix uninitialized read in ARM's PrintAsmOperand
Jul 30 2018, 9:46 AM
thopre closed D49984: Fix uninitialized read in ARM's PrintAsmOperand.
Jul 30 2018, 9:46 AM
thopre updated the diff for D45437: Support inline asm with multiple 64bit output in 32bit GPR.

Rebase and rename testcase for consistency

Jul 30 2018, 9:09 AM