[SimplifyLibCalls] Return Value from optimizeSinCosPi when making change
authorArthur Eubanks <aeubanks@google.com>
Tue, 14 Mar 2023 16:40:48 +0000 (09:40 -0700)
committerArthur Eubanks <aeubanks@google.com>
Tue, 14 Mar 2023 22:16:44 +0000 (15:16 -0700)
commit093b2640ea90466073be76208fad70960e026b36
treedbb63e8c374f471cdf136b3047a56e5d22c6efda
parent2ef416273f85ed355f4cbaa996fd8d9c229dbfab
[SimplifyLibCalls] Return Value from optimizeSinCosPi when making change

Or else InstCombine can incorrectly report that no change has been made.

This optimization doesn't really fit into InstCombine since it optimizes multiple instructions at once; there's likely a more comprehensive fix.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D146064
llvm/include/llvm/Transforms/Utils/SimplifyLibCalls.h
llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
llvm/test/Transforms/InstCombine/sincospi.ll