6 Commits

Author SHA1 Message Date
Kevin P. Neal
eb2558c566 Recommit [FPEnv][InstSimplify] Correct strictfp tests.
The errant test in the previous iteration has been corrected now.

Correct InstSimplify strictfp tests to follow the rules documented
in the LangRef:
https://llvm.org/docs/LangRef.html#constrained-floating-point-intrinsics

Some of these tests needed the strictfp attribute on function
definitions. After D154991 the constrained intrinsics have the
strictfp attribute by default so they don't need it here, but other
functions do.

Test changes verified with D146845.
2023-08-03 09:44:50 -04:00
Kevin P. Neal
b711d11c83 Revert "[FPEnv][InstSimplify] Correct strictfp tests."
This reverts commit d9b1036bc469ef7f65e43ac240be6db47759dbb2.

Bots are showing breakage.
2023-08-02 13:16:44 -04:00
Kevin P. Neal
d9b1036bc4 [FPEnv][InstSimplify] Correct strictfp tests.
Correct InstSimplify strictfp tests to follow the rules documented
in the LangRef:
https://llvm.org/docs/LangRef.html#constrained-floating-point-intrinsics

Some of these tests needed the strictfp attribute on function
definitions. After D154991 the constrained intrinsics have the
strictfp attribute by default so they don't need it here, but other
functions do.

Test changes verified with D146845.
2023-08-02 13:06:55 -04:00
Bjorn Pettersson
b280ee1dd7 [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC
Another step moving away from the deprecated syntax of specifying
pass pipeline in opt.

Differential Revision: https://reviews.llvm.org/D119080
2022-02-07 14:26:58 +01:00
Kevin P. Neal
52900486a1 [FPEnv][InstSimplify] Constrained FP support for NaN
Currently InstructionSimplify.cpp knows how to simplify floating point
instructions that have a NaN operand. It does not know how to handle the
matching constrained FP intrinsic.

This patch teaches it how to simplify so long as the exception handling
is not "fpexcept.strict".

Differential Revision: https://reviews.llvm.org/D103169
2021-07-09 11:26:28 -04:00
Kevin P. Neal
60a8edf30d [FPEnv][InstSimplify] Precommit tests for D103169.
In D103169 I'm adding to InstSimplify support for NaN to constrained
intrinsics that have a regular FP IR instruction counterpart. Precommit
the tests for clarity when that ticket lands.
2021-06-17 10:34:39 -04:00