Skip to content

Commit df8264c

Browse files
committed
[SimplifyLibCalls] Use helper methods to query attributes (NFC)
1 parent ac47db6 commit df8264c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2515,8 +2515,7 @@ static bool isTrigLibCall(CallInst *CI) {
25152515
// We can only hope to do anything useful if we can ignore things like errno
25162516
// and floating-point exceptions.
25172517
// We already checked the prototype.
2518-
return CI->hasFnAttr(Attribute::NoUnwind) &&
2519-
CI->hasFnAttr(Attribute::ReadNone);
2518+
return CI->doesNotThrow() && CI->doesNotAccessMemory();
25202519
}
25212520

25222521
static bool insertSinCosCall(IRBuilderBase &B, Function *OrigCallee, Value *Arg,

0 commit comments

Comments
 (0)