[PATCH] D139130: InstCombine: Fold and (fcmp), (is.fpclass) into is.fpclass
Joshua Cranmer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 20 13:27:25 PST 2022
jcranmer-intel added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp:1300-1303
+ // fcmp ueq x, +inf -> is_fpclass x, fcPosInf|fcNan
+ // fcmp ueq fabs(x), +inf -> is_fpclass x, fcInf|fcNan
+ // fcmp ueq x, -inf -> is_fpclass x, fcNegInf|fcNan
+ // fcmp ueq fabs(x), -inf -> is_fpclass x, fcNan
----------------
This block is handling `fcmp une`, so these latter 4 cases should be using `fcmp une`.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp:1319-1321
+ // Match __builtin_isinf patterns
+ // fcmp one x, -inf -> is_fpclass x, fcNegInf
+ // fcmp one fabs(x), -inf -> is_fpclass x, ~fcNan
----------------
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp:1323
+ // fcmp ueq x, +inf -> is_fpclass x, fcPosInf|fcNan
+ // fcmp ueq (fabs x), +inf -> is_fpclass x, fcInf|fcNan
+ //
----------------
You're missing 4 examples here--one with +inf and ueq with -inf.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139130/new/
https://reviews.llvm.org/D139130
More information about the llvm-commits
mailing list