r373744 - [clang] Prevent false positives in arm-mfpu-none codegen test.

Simon Tatham via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 4 06:01:41 PDT 2019


Author: statham
Date: Fri Oct  4 06:01:41 2019
New Revision: 373744

URL: http://llvm.org/viewvc/llvm-project?rev=373744&view=rev
Log:
[clang] Prevent false positives in arm-mfpu-none codegen test.

A user pointed out to me in private email that this test will fail if
it sees the letter 's' followed by a digit in any part of clang's
assembly output after the function label. That includes the .ident at
the end, which can include a full pathname or hostname or both from
the system clang was built on. So if that path or hostname includes
any text like 's5' then it will cause the test to fail.

Fixed by adding a check for `.fnend`, to limit the scope of the
`CHECK-NOT` to only the actual generated code for the test function.

(Committed without prior review on the basis that it's a simple and
obvious pure test-suite fix and also in a test I contributed myself.)

Modified:
    cfe/trunk/test/CodeGen/arm-mfpu-none.c

Modified: cfe/trunk/test/CodeGen/arm-mfpu-none.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/arm-mfpu-none.c?rev=373744&r1=373743&r2=373744&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/arm-mfpu-none.c (original)
+++ cfe/trunk/test/CodeGen/arm-mfpu-none.c Fri Oct  4 06:01:41 2019
@@ -3,6 +3,7 @@
 
 // CHECK-LABEL: compute
 // CHECK-NOT: {{s[0-9]}}
+// CHECK: .fnend
 float compute(float a, float b) {
   return (a+b) * (a-b);
 }




More information about the cfe-commits mailing list