[PATCH] D137631: AArch64: implement canonical `!isnan(...)` with single compare.

Tim Northover via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 8 03:59:30 PST 2022


t.p.northover created this revision.
t.p.northover added a reviewer: paquette.
Herald added subscribers: hiraditya, kristof.beyls, mcrosier.
Herald added a project: All.
t.p.northover requested review of this revision.
Herald added a project: LLVM.

LLVM canonicalizes a check for whether a number is NaN or not to `fcmp ord %in, zeroinitializer`. An `ord` check normally needs to be lowered to two separate comparisons on AArch64 but in this case it's equivalent to `fcmp oeq %in, %in` which we have a single `fcmeq` instruction for.


https://reviews.llvm.org/D137631

Files:
  llvm/lib/Target/AArch64/GISel/AArch64PostLegalizerLowering.cpp
  llvm/test/CodeGen/AArch64/GlobalISel/lower-neon-vector-fcmp.mir
  llvm/test/CodeGen/AArch64/neon-compare-instructions.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137631.473952.patch
Type: text/x-patch
Size: 35536 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221108/ebf7b614/attachment.bin>


More information about the llvm-commits mailing list