[PATCH] D23630: [PPC] Expand ISEL instruction into if-then-else sequence

Tony Jiang via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 20 13:18:38 PST 2016


jtony updated this revision to Diff 78664.
jtony marked 8 inline comments as done.
jtony added a comment.

Special case 1: If all the registers of ISEL instruction are the same, we simply remove the ISEL instruction.
Special case 2: If the input registers of the ISEL instruction are the same but different with the output register, we just replace ISEL with one unconditional copy.
Special case 3: If the true value register of the ISEL instruction is the same with the dest register, we skip the true block.
Special case 4: If the false value register of the ISEL instruction is the same with the dest register, we skip the false block.
Most general case 5: Otherwise,  we expand ISEL to if-then-else.


https://reviews.llvm.org/D23630

Files:
  lib/Target/PowerPC/CMakeLists.txt
  lib/Target/PowerPC/PPC.h
  lib/Target/PowerPC/PPCExpandISEL.cpp
  lib/Target/PowerPC/PPCTargetMachine.cpp
  test/CodeGen/PowerPC/expand-isel.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23630.78664.patch
Type: text/x-patch
Size: 16521 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161120/534e7a36/attachment.bin>


More information about the llvm-commits mailing list