[llvm] [Transforms] Create more optimizing functions to fold inverse trig pairs (PR #77799)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 11 23:37:34 PST 2024


================
@@ -0,0 +1,59 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4
+; RUN: opt < %s -passes=instcombine -S | FileCheck %s
+
+define float @mytan(float %x) {
+; CHECK-LABEL: define float @mytan(
+; CHECK-SAME: float [[X:%.*]]) {
+; CHECK-NEXT:    [[CALL:%.*]] = call float @atanf(float [[X]])
+; CHECK-NEXT:    [[CALL1:%.*]] = call float @tanf(float [[CALL]])
----------------
arsenm wrote:

All of these tests don't have flags. You should have all the tests with the necessary flags, and then some negative tests with missing flags 

https://github.com/llvm/llvm-project/pull/77799


More information about the llvm-commits mailing list