[PATCH] D86726: [InstCombine]: Transform 1.0/sqrt(X) * X to X/sqrt(X) and X * 1.0/sqrt(X) to X/sqrt(X)
Noel Grandin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 28 00:39:21 PDT 2020
grandinj added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp:552
+
+ // X * 1.0/sqrt(X) = X/sqrt(X).
+ if (match(Op1, (m_FDiv(m_SpecificFP(1.0), m_Value(Y)))) &&
----------------
Just a drive-by commentator: I am surprised there is not an existing transform which does
1 * X ==> X
X * 1 ==> X
X / 1 ==> X
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86726/new/
https://reviews.llvm.org/D86726
More information about the llvm-commits
mailing list