-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A reproducible testcase for issue #1413 is added. The testcase checks if AVX512 pgmath functions are generated only when avx512 target options are specified.
- Loading branch information
1 parent
8e65ce5
commit 09ed141
Showing
3 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# | ||
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
# See https://llvm.org/LICENSE.txt for license information. | ||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
# | ||
|
||
$(TEST): run | ||
|
||
EXTFLAGS=-O3 -march=x86-64 -mtune=core-avx2 -mfma -mavx -mavx2 -mllvm -force-vector-width=16 | ||
|
||
build: $(SRC)/$(TEST).f90 | ||
-$(RM) $(TEST).$(EXESUFFIX) core *.d *.mod FOR*.DAT FTN* ftn* fort.* | ||
@echo ------------------------------------ building test $@ | ||
-$(CC) -c $(CFLAGS) $(SRC)/check.c -o check.$(OBJX) | ||
-$(FC) -c $(FFLAGS) $(EXTFLAGS) $(LDFLAGS) $(SRC)/$(TEST).f90 -o $(TEST).$(OBJX) | ||
-$(FC) $(FFLAGS) $(LDFLAGS) $(TEST).$(OBJX) check.$(OBJX) $(LIBS) -o $(TEST).$(EXESUFFIX) | ||
|
||
|
||
run: | ||
@echo ------------------------------------ executing test $(TEST) | ||
$(TEST).$(EXESUFFIX) | ||
|
||
verify: ; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# | ||
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
# See https://llvm.org/LICENSE.txt for license information. | ||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
||
# Shared lit script for each tests. Run bash commands that run tests with make. | ||
|
||
# RUN: env KEEP_FILES=%keep FLAGS=%flags TEST_SRC=%/s MAKE_FILE_DIR=%/S/.. bash %/S/runmake | tee %/t | ||
# RUN: cat %t | FileCheck %S/runmake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
! | ||
! Part of the LLVM Project, under the Apache License v2.0 with LLVM | ||
! Exceptions. | ||
! See https://llvm.org/LICENSE.txt for license information. | ||
! SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
! | ||
! Test for USE statement when there is rename of user-defined operator in the | ||
! ONLY option. | ||
|
||
program main | ||
real (kind=8) :: a(128), b(128), c(128) | ||
integer :: res,expect | ||
res=1 | ||
expect=2 | ||
do i=1,100 | ||
c(i) = log(a(i)) + log(b(i)) | ||
enddo | ||
call sub1(a,b,c,128,res) | ||
call check(res,expect,1); | ||
|
||
contains | ||
|
||
subroutine sub1(a,b,c,N,res) | ||
real(kind=8), intent(in) :: a(:), b(:) | ||
real(kind=8),intent (out) :: c(:) | ||
integer, intent(IN) :: N | ||
integer, intent(OUT) :: res | ||
|
||
do i=1,N,16 | ||
c(i) = exp(log(a(i))) + dlog(b(i)) | ||
enddo | ||
res=2 | ||
end subroutine | ||
|
||
end program | ||
|