+63









Zahira Ammarguellat
Joseph Huber
Guray Ozen
Nishant Patel
Jessica Clarke
Petr Hosek
Joseph Huber
Craig Topper
Alexander Yermolovich
Usama Hameed
Philip Reames
Evgenii Kudriashov
Fangrui Song
Aart Bik
Valentin Clement
Youngsuk Kim
Arthur Eubanks
Jan Svoboda
Walter Erquinigo
Eric
Fazlay Rabbi
Pete Lawrence
Jonas Devlieghere
Adrian Prantl
Owen Pan
LLVM GN Syncbot
Med Ismail Bennani
Congcong Cai
Rik Huijzer
Wang Pengcheng
Yuanfang Chen
Kazu Hirata
Mehdi Amini
Aiden Grossman
Rana Pratap Reddy
Yingwei Zheng
Piotr Zegar
KAWASHIMA Takahiro
Tobias Hieta
Luke Lau
Shivam Gupta
cor3ntin
Yeting Kuo
Stanislav Mekhanoshin
David Spickett
Matthew Devereau
Martin Storsjö
Qiu Chaofan
Pierre van Houtryve
Mikael Holmen
Uday Bondhugula
Nikita Popov
Johannes Reifferscheid
Benjamin Kramer
Oliver Stannard
Dmitry Vyukov
Benjamin Maxwell
Piotr Sobczak
Simon Pilgrim
Timm Bäder
Sunil Kuravinakop
zhongyunde 00443407
Christudasan Devadasan
bjacob
Weining Lu
Andrzej Warzyński
Jay Foad
Markus Mützel
Erik Jonsson
Pete Steinfeld
Alexey Bataev
Louis Dionne
Qizhi Hu
b40c534656
This patch adds the #pragma CX_LIMITED_RANGE defined in the C specification. It also adds the options -f[no]cx-limited-range and -f[no]cx-fortran-rules. -fcx-limited-range enables algebraic formulas for complex multiplication and division. This option is enabled with -ffast-math. -fcx-fortran-rules enables algebraic formulas for complex multiplication and enables Smith’s algorithm for complex division (SMITH, R. L. Algorithm 116: Complex division. Commun. ACM 5, 8 (1962)). --------- Signed-off-by: Med Ismail Bennani <ismail@bennani.ma> Co-authored-by: Joseph Huber <jhuber6@vols.utk.edu> Co-authored-by: Guray Ozen <guray.ozen@gmail.com> Co-authored-by: Nishant Patel <nishant.b.patel@intel.com> Co-authored-by: Jessica Clarke <jrtc27@jrtc27.com> Co-authored-by: Petr Hosek <phosek@google.com> Co-authored-by: Joseph Huber <35342157+jhuber6@users.noreply.github.com> Co-authored-by: Craig Topper <craig.topper@sifive.com> Co-authored-by: Alexander Yermolovich <43973793+ayermolo@users.noreply.github.com> Co-authored-by: Usama Hameed <u_hameed@apple.com> Co-authored-by: Philip Reames <preames@rivosinc.com> Co-authored-by: Evgenii Kudriashov <evgenii.kudriashov@intel.com> Co-authored-by: Fangrui Song <i@maskray.me> Co-authored-by: Aart Bik <39774503+aartbik@users.noreply.github.com> Co-authored-by: Valentin Clement <clementval@gmail.com> Co-authored-by: Youngsuk Kim <youngsuk.kim@hpe.com> Co-authored-by: Arthur Eubanks <aeubanks@google.com> Co-authored-by: Jan Svoboda <jan_svoboda@apple.com> Co-authored-by: Walter Erquinigo <a20012251@gmail.com> Co-authored-by: Eric <eric@efcs.ca> Co-authored-by: Fazlay Rabbi <106703039+mdfazlay@users.noreply.github.com> Co-authored-by: Pete Lawrence <plawrence@apple.com> Co-authored-by: Jonas Devlieghere <jonas@devlieghere.com> Co-authored-by: Adrian Prantl <aprantl@apple.com> Co-authored-by: Owen Pan <owenpiano@gmail.com> Co-authored-by: LLVM GN Syncbot <llvmgnsyncbot@gmail.com> Co-authored-by: Med Ismail Bennani <ismail@bennani.ma> Co-authored-by: Congcong Cai <congcongcai0907@163.com> Co-authored-by: Rik Huijzer <github@huijzer.xyz> Co-authored-by: Wang Pengcheng <wangpengcheng.pp@bytedance.com> Co-authored-by: Yuanfang Chen <tabloid.adroit@gmail.com> Co-authored-by: Kazu Hirata <kazu@google.com> Co-authored-by: Mehdi Amini <joker.eph@gmail.com> Co-authored-by: Aiden Grossman <agrossman154@yahoo.com> Co-authored-by: Rana Pratap Reddy <109514914+ranapratap55@users.noreply.github.com> Co-authored-by: Yingwei Zheng <dtcxzyw2333@gmail.com> Co-authored-by: Piotr Zegar <me@piotrzegar.pl> Co-authored-by: KAWASHIMA Takahiro <t-kawashima@fujitsu.com> Co-authored-by: Tobias Hieta <tobias@hieta.se> Co-authored-by: Luke Lau <luke@igalia.com> Co-authored-by: Shivam Gupta <shivam98.tkg@gmail.com> Co-authored-by: cor3ntin <corentinjabot@gmail.com> Co-authored-by: Yeting Kuo <46629943+yetingk@users.noreply.github.com> Co-authored-by: Stanislav Mekhanoshin <rampitec@users.noreply.github.com> Co-authored-by: David Spickett <david.spickett@linaro.org> Co-authored-by: Matthew Devereau <matthew.devereau@arm.com> Co-authored-by: Martin Storsjö <martin@martin.st> Co-authored-by: Qiu Chaofan <qiucofan@cn.ibm.com> Co-authored-by: Pierre van Houtryve <pierre.vanhoutryve@amd.com> Co-authored-by: Mikael Holmen <mikael.holmen@ericsson.com> Co-authored-by: Uday Bondhugula <uday@polymagelabs.com> Co-authored-by: Nikita Popov <npopov@redhat.com> Co-authored-by: Johannes Reifferscheid <jreiffers@google.com> Co-authored-by: Benjamin Kramer <benny.kra@googlemail.com> Co-authored-by: Oliver Stannard <oliver.stannard@arm.com> Co-authored-by: Dmitry Vyukov <dvyukov@google.com> Co-authored-by: Benjamin Maxwell <benjamin.maxwell@arm.com> Co-authored-by: Piotr Sobczak <piotr.sobczak@amd.com> Co-authored-by: Simon Pilgrim <llvm-dev@redking.me.uk> Co-authored-by: Timm Bäder <tbaeder@redhat.com> Co-authored-by: Sunil Kuravinakop <koops@hpe.com> Co-authored-by: zhongyunde 00443407 <zhongyunde@huawei.com> Co-authored-by: Christudasan Devadasan <Christudasan.Devadasan@amd.com> Co-authored-by: bjacob <jacob.benoit.1@gmail.com> Co-authored-by: Weining Lu <luweining@loongson.cn> Co-authored-by: Andrzej Warzyński <andrzej.warzynski@arm.com> Co-authored-by: Jay Foad <jay.foad@amd.com> Co-authored-by: Markus Mützel <markus.muetzel@gmx.de> Co-authored-by: Erik Jonsson <erik.j.jonsson@ericsson.com> Co-authored-by: Pete Steinfeld <47540744+psteinfeld@users.noreply.github.com> Co-authored-by: Alexey Bataev <a.bataev@outlook.com> Co-authored-by: Louis Dionne <ldionne.2@gmail.com> Co-authored-by: Qizhi Hu <836744285@qq.com>
39 lines
1.8 KiB
C
39 lines
1.8 KiB
C
// RUN: %clang_cc1 -fsyntax-only -Wunknown-pragmas -verify %s
|
|
// RUN: %clang_cc1 -E %s 2>&1 | FileCheck --strict-whitespace %s
|
|
|
|
// GCC doesn't expand macro args for unrecognized pragmas.
|
|
#define bar xX
|
|
#pragma foo bar // expected-warning {{unknown pragma ignored}}
|
|
// CHECK-NOT: unknown pragma in STDC namespace
|
|
// CHECK: {{^}}#pragma foo bar{{$}}
|
|
|
|
#pragma STDC FP_CONTRACT ON
|
|
#pragma STDC FP_CONTRACT OFF
|
|
#pragma STDC FP_CONTRACT DEFAULT
|
|
#pragma STDC FP_CONTRACT IN_BETWEEN // expected-warning {{expected 'ON' or 'OFF' or 'DEFAULT' in pragma}}
|
|
// CHECK: {{^}}#pragma STDC FP_CONTRACT ON{{$}}
|
|
// CHECK: {{^}}#pragma STDC FP_CONTRACT OFF{{$}}
|
|
// CHECK: {{^}}#pragma STDC FP_CONTRACT DEFAULT{{$}}
|
|
// CHECK: {{^}}#pragma STDC FP_CONTRACT IN_BETWEEN{{$}}
|
|
|
|
#pragma STDC CX_LIMITED_RANGE ON
|
|
#pragma STDC CX_LIMITED_RANGE OFF
|
|
#pragma STDC CX_LIMITED_RANGE DEFAULT
|
|
#pragma STDC CX_LIMITED_RANGE IN_BETWEEN // expected-warning {{expected 'ON' or 'OFF' or 'DEFAULT' in pragma}}
|
|
// CHECK: {{^}}#pragma STDC CX_LIMITED_RANGE ON{{$}}
|
|
// CHECK: {{^}}#pragma STDC CX_LIMITED_RANGE OFF{{$}}
|
|
// CHECK: {{^}}#pragma STDC CX_LIMITED_RANGE DEFAULT{{$}}
|
|
// CHECK: {{^}}#pragma STDC CX_LIMITED_RANGE IN_BETWEEN{{$}}
|
|
|
|
#pragma STDC CX_LIMITED_RANGE // expected-warning {{expected 'ON' or 'OFF' or 'DEFAULT' in pragma}}
|
|
#pragma STDC CX_LIMITED_RANGE ON FULL POWER // expected-warning {{expected end of directive in pragma}}
|
|
//expected-error@-1 {{unknown type name 'POWER'}}
|
|
//expected-error@-2 {{expected identifier or '('}}
|
|
// CHECK: {{^}}#pragma STDC CX_LIMITED_RANGE{{$}}
|
|
// CHECK: {{^}}#pragma STDC CX_LIMITED_RANGE ON FULL POWER{{$}}
|
|
|
|
#pragma STDC SO_GREAT // expected-warning {{unknown pragma in STDC namespace}}
|
|
#pragma STDC // expected-warning {{unknown pragma in STDC namespace}}
|
|
// CHECK: {{^}}#pragma STDC SO_GREAT{{$}}
|
|
// CHECK: {{^}}#pragma STDC{{$}}
|