[PATCH] [SDAG] Optimize unordered comparison in soft-float mode
Anton Nadolskiy
anton.nadolskiy at gmail.com
Mon Jun 29 07:54:57 PDT 2015
Hi resistor,
Current implementation handles unordered comparison poorly.
Consider (a ULE b) which is a <= b. It is lowered to (__ledf2(a, b) <= 0 || __unorddf2(a, b) != 0) (in general). We can do better job by lowering it to (__gtdf2(a, b) <= 0).
Such replacement is true for other CMP's (ult, ugt, uge). In general, we just call same function as for ordered case but negate comparison against zero.
REPOSITORY
rL LLVM
http://reviews.llvm.org/D10804
Files:
lib/CodeGen/SelectionDAG/TargetLowering.cpp
test/CodeGen/AArch64/arm64-fp128.ll
test/CodeGen/Mips/mips16fpe.ll
test/CodeGen/Thumb2/float-cmp.ll
test/CodeGen/Thumb2/float-intrinsics-double.ll
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10804.28671.patch
Type: text/x-patch
Size: 9754 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150629/061173ff/attachment.bin>
More information about the llvm-commits
mailing list