DAG combiner had been disabled for 'optnone' functions in r221168.
It was re-enabled in r233153. Add a test to keep it from happening again.
Details
Diff Detail
Event Timeline
Inline comment.
test/CodeGen/X86/dag-optnone.ll | ||
---|---|---|
8 | Could you describe the problem that would occur were the dag combiner not run? That hasn't been clear either in this test or in your original commit reverting. |
test/CodeGen/X86/dag-optnone.ll | ||
---|---|---|
8 | The most basic description of 'optnone' is "be as much like -O0 as practical." The patch that I reverted would disable DAG combine specifically for 'optnone' but not for -O0. This caused spurious differences between -O0 and 'optnone' which were caught by some internal tests designed to expect no differences. |
Add a bit more detail to the comment explaining the test.
Run llc at -O0 to show we expect the combine at -O0, and also see it with optnone.
"What caused you to notice not running the DAG combiner was a problem?"
A fuzzer that we wrote generated some functions with 'optnone' and they crashed the compiler with instruction-selection failures.
Being mostly vector-related, Andrea looked at them, and didn't take long to point the finger at DAG combine (or lack thereof!).
Should I take this to imply you'd rather have one of the causes-a-crash functions as the test, instead of this one?
--paulr
From: Eric Christopher [mailto:echristo@gmail.com]
Sent: Wednesday, March 25, 2015 4:44 PM
To: reviews+D8614+public+1ca59dfb9fe35dfd@reviews.llvm.org; Robinson, Paul; dblaikie@gmail.com
Cc: llvm-commits@cs.uiuc.edu
Subject: Re: [PATCH] Verify 'optnone' can run DAG combiner when appropriate
Add an extensive background description to the commentary, with particular attention to sources of possible fragility in the test.
incorporate a test case that used to fail instruction selection.
Yes, it's a this-doesn't-crash test, but I really have no clue what it could robustly check for; the vector stuff is seeing a whole lot of churn lately, and I don't understand the vector instructions in any useful way in the first place. If somebody can make a specific suggestion, I'm happy to add something.
Looks good. FWIW this is what should have been in the revert patch commit message as well :)
-eric
FWIW my thinking was "undo the obvious mistake." Just not as obvious as I thought, I guess!
And although Phab has recorded the revision correctly on the web page, it's not in the email, so:
r233584.
Could you describe the problem that would occur were the dag combiner not run? That hasn't been clear either in this test or in your original commit reverting.