[llvm] 244494a - [Hexagon] Fix test on OpenBSD

Brad Smith via llvm-commits llvm-commits at lists.llvm.org
Mon May 23 20:30:30 PDT 2022


Author: Brad Smith
Date: 2022-05-23T23:26:14-04:00
New Revision: 244494a201f81996a401e49c7b13bdf54589f293

URL: https://github.com/llvm/llvm-project/commit/244494a201f81996a401e49c7b13bdf54589f293
DIFF: https://github.com/llvm/llvm-project/commit/244494a201f81996a401e49c7b13bdf54589f293.diff

LOG: [Hexagon] Fix test on OpenBSD

The test specifies a CPU arch but not a particular OS. So if run on
OpenBSD it acts as if it's an OpenBSD/hexagon system. OpenBSD uses
__guard_local instead of __stack_chk_guard so the test will fail. So
specify an OS other than OpenBSD fixes the test.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D126265

Added: 
    

Modified: 
    llvm/test/CodeGen/Hexagon/sdata-stack-guard.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/CodeGen/Hexagon/sdata-stack-guard.ll b/llvm/test/CodeGen/Hexagon/sdata-stack-guard.ll
index 2b618f09afc3..56a0c9812456 100644
--- a/llvm/test/CodeGen/Hexagon/sdata-stack-guard.ll
+++ b/llvm/test/CodeGen/Hexagon/sdata-stack-guard.ll
@@ -1,9 +1,9 @@
 ; Check that the __stack_chk_guard was placed in small data.
-; RUN: llc -march=hexagon -O2 -hexagon-small-data-threshold=4 < %s | FileCheck -check-prefix=GPREL %s
+; RUN: llc -march=hexagon -mtriple=hexagon-unknown-linux-gnu -O2 -hexagon-small-data-threshold=4 < %s | FileCheck -check-prefix=GPREL %s
 ; GPREL: memw(gp+#__stack_chk_guard)
 
 ; For threshold less than 4 (size of address), the variable is not placed in small-data
-; RUN: llc -march=hexagon -O2 -hexagon-small-data-threshold=0 < %s | FileCheck -check-prefix=ABS %s
+; RUN: llc -march=hexagon -mtriple=hexagon-unknown-linux-gnu -O2 -hexagon-small-data-threshold=0 < %s | FileCheck -check-prefix=ABS %s
 ; ABS: memw(##__stack_chk_guard)
 
 @g0 = private unnamed_addr constant [37 x i8] c"This string is longer than 16 bytes\0A\00", align 1


        


More information about the llvm-commits mailing list