[PATCH] D48067: [InstCombine] Replacing X86-specific rounding intrinsics with generic floor-ceil
Mikhail Dvoretckii via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 12 03:00:03 PDT 2018
mike.dvoretsky created this revision.
mike.dvoretsky added reviewers: craig.topper, spatel, RKSimon.
Herald added subscribers: llvm-commits, hiraditya.
Currently, X86 floor and ceil intrinsics for vectors are implemented as target-specific intrinsics that use the generic rounding instruction of the corresponding vector processing feature (ROUND* or VRNDSCALE*). This patch replaces those specific cases with calls to target-independent @llvm.floor.* and @llvm.ceil.* intrinsics. This doesn't affect the resulting machine code, as those intrinsics are lowered to the same instructions, but exposes these specific rounding cases to generic optimizations.
This patch relies on https://reviews.llvm.org/D45203 to fold the resulting IR patterns and serves as an alternative to https://reviews.llvm.org/D45202.
Repository:
rL LLVM
https://reviews.llvm.org/D48067
Files:
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
llvm/test/Transforms/InstCombine/X86/x86-avx.ll
llvm/test/Transforms/InstCombine/X86/x86-avx512.ll
llvm/test/Transforms/InstCombine/X86/x86-sse41.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48067.150911.patch
Type: text/x-patch
Size: 25740 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180612/02d4291f/attachment.bin>
More information about the llvm-commits
mailing list