[PATCH] Fix incorrect error-less failure when combining CHECK-DAG and CHECK-NOT
Daniel Sanders
Daniel.Sanders at imgtec.com
Fri Aug 2 01:41:16 PDT 2013
Hi,
Could someone review this patch and (assuming it's ok) commit it?
Thanks
From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-bounces at cs.uiuc.edu] On Behalf Of Daniel Sanders
Sent: 24 July 2013 11:52
To: llvm-commits at cs.uiuc.edu
Subject: [PATCH] Fix incorrect error-less failure when combining CHECK-DAG and CHECK-NOT
Hi,
I previously submitted this to bugzilla (http://llvm.org/bugs/show_bug.cgi?id=16450) but my colleague, Reed Kotler, tells me I should have sent it here. I don't have commit access so I need both approval for the patch and for someone to commit it for me.
This patch fixes a bug in FileCheck that leads to an error-less failure when combining CHECK-DAG and CHECK-NOT in certain ways. This error-less failure occurs when the test should have passed.
There are two locations in the CHECK-DAG processing that CHECK-NOT is processed and one of them is handled incorrectly. The one that is incorrect is taking the bool returned by CheckNot(), casting it to size_t, then comparing it to a large unsigned value. This comparison is always false whether the pattern is matched or not.
It seems that the existing tests only check that successful matches of the CHECK-NOT pattern trigger failures. I didn't find any tests that check that unsuccessful matches allow the test to pass.
This patch uses the result of CheckNot() directly in the if-statement without the intermediate size_t and adds a test to check-dag.txt. The test has been added to an existing test but it can be made a separate test if you prefer.
Daniel Sanders
Leading Software Design Engineer, MIPS Processor IP
Imagination Technologies Limited
www.imgtec.com<http://www.imgtec.com/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130802/5e723a38/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: check-dag-check-not-fix.patch
Type: application/octet-stream
Size: 1407 bytes
Desc: check-dag-check-not-fix.patch
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130802/5e723a38/attachment.obj>
More information about the llvm-commits
mailing list