-
Notifications
You must be signed in to change notification settings - Fork 15.1k
Open
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzilla
Description
| Bugzilla Link | 11222 |
| Version | trunk |
| OS | All |
| Attachments | First file: original test case, Second file: test case after opt -O3 -S |
| Reporter | LLVM Bugzilla Contributor |
Extended Description
I have a ParseInt function which is able to parse either a integer or a hex string (beginning with $). While parsing integers and hex numbers is really similar, i put them into one function.
The test case is compiled from the following program:
static init
begin
var i: int = ParseInt('5', 0)
print(IntToStr(i))
end
I attached a second file which is the run after opt -O3.
As you see in block vergleich.i in line 54, %testpx.i is compared wether it is smaller than 10.
In gleich.i, %textpx.i is compared wether it is greater than 9. %gleich.i's predecessor is %vergleich2.i which predecessor is %vergleich.i
But %vergleich.i only branches into vergleich2.i when %testpx.i is smaller than 10, so it can never become greater than 9.
Metadata
Metadata
Assignees
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzilla