aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Attributes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/IR/Attributes.cpp')
-rw-r--r--llvm/lib/IR/Attributes.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/IR/Attributes.cpp b/llvm/lib/IR/Attributes.cpp
index c1c4c0f..ace23f3 100644
--- a/llvm/lib/IR/Attributes.cpp
+++ b/llvm/lib/IR/Attributes.cpp
@@ -2026,6 +2026,10 @@ static bool checkDenormMode(const Function &Caller, const Function &Callee) {
if (denormModeCompatible(CallerMode, CalleeMode)) {
DenormalMode CallerModeF32 = Caller.getDenormalModeF32Raw();
DenormalMode CalleeModeF32 = Callee.getDenormalModeF32Raw();
+ if (CallerModeF32 == DenormalMode::getInvalid())
+ CallerModeF32 = CallerMode;
+ if (CalleeModeF32 == DenormalMode::getInvalid())
+ CalleeModeF32 = CalleeMode;
return denormModeCompatible(CallerModeF32, CalleeModeF32);
}