[PATCH] R600/SI: Allow commuting compares
Matt Arsenault
Matthew.Arsenault at amd.com
Wed Feb 18 02:39:41 PST 2015
This enables very common cases to switch to the
smaller encoding.
All of the standard LLVM canonicalizations of comparisons
are the opposite of what we want. Compares with constants
are moved to the RHS, but the first operand can be an inline
immediate, literal constant, or SGPR using the 32-bit VOPC
encoding.
There are additional bad canonicalizations that should
also be fixed, such as canonicalizing ge x, k to gt x, (k + 1)
if this makes k no longer an inline immediate value.
http://reviews.llvm.org/D7720
Files:
lib/Target/R600/SIInstrInfo.cpp
lib/Target/R600/SIInstrInfo.h
lib/Target/R600/SIInstructions.td
test/CodeGen/R600/commute-compares.ll
test/CodeGen/R600/fceil64.ll
test/CodeGen/R600/ffloor.f64.ll
test/CodeGen/R600/ftrunc.f64.ll
test/CodeGen/R600/i1-copy-phi.ll
test/CodeGen/R600/llvm.AMDGPU.div_fmas.ll
test/CodeGen/R600/llvm.round.f64.ll
test/CodeGen/R600/llvm.round.ll
test/CodeGen/R600/or.ll
test/CodeGen/R600/setcc-opt.ll
test/CodeGen/R600/sgpr-control-flow.ll
test/CodeGen/R600/trunc-cmp-constant.ll
test/CodeGen/R600/trunc.ll
test/CodeGen/R600/valu-i1.ll
test/CodeGen/R600/xor.ll
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7720.20157.patch
Type: text/x-patch
Size: 55093 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150218/043b2721/attachment.bin>
More information about the llvm-commits
mailing list