[llvm] b9a3551 - [FPEnv][BitcodeReader] Correct strictfp test.

Kevin P. Neal via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 10 11:05:31 PDT 2024


Author: Kevin P. Neal
Date: 2024-04-10T14:05:24-04:00
New Revision: b9a3551c905573df456ee52fa1051e49fa956c65

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

LOG: [FPEnv][BitcodeReader] Correct strictfp test.

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

This test needed the strictfp attribute added to a function definition.

Test changes verified with D146845.

Added: 
    

Modified: 
    llvm/unittests/Bitcode/BitReaderTest.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/unittests/Bitcode/BitReaderTest.cpp b/llvm/unittests/Bitcode/BitReaderTest.cpp
index 3e449f90577898..22cc5e74928030 100644
--- a/llvm/unittests/Bitcode/BitReaderTest.cpp
+++ b/llvm/unittests/Bitcode/BitReaderTest.cpp
@@ -160,7 +160,7 @@ TEST(BitReaderTest, MaterializeConstrainedFPStrictFP) {
   LLVMContext Context;
   std::unique_ptr<Module> M = getLazyModuleFromAssembly(
       Context, Mem,
-      "define double @foo(double %a) {\n"
+      "define double @foo(double %a) strictfp {\n"
       "  %result = call double @llvm.experimental.constrained.sqrt.f64(double "
       "%a, metadata !\"round.tonearest\", metadata !\"fpexcept.strict\") "
       "strictfp\n"


        


More information about the llvm-commits mailing list