[PATCH] CodeGenPrepare: Avoid and/or i1 in select conditions.

Matthias Braun matze at braunis.de
Thu Mar 5 14:41:50 PST 2015


After looking at some more examples I tweaked the code some more:

- I'm not checking for hasOnlySelectAsUser() anymore. The fact that we have only select users means that we could get rid of the extra register and the SETCC but we produce an extra select instruction for each of the users, this is not necessarily better so I changed to the conservative hasOneUser().
- Tweak the callback to not cover types that need multiple registers as those will typically be broken down into multiple select-like instructions.


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D7622

Files:
  include/llvm/Target/TargetLowering.h
  lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  test/CodeGen/ARM/movcc-double.ll
  test/CodeGen/R600/or.ll
  test/CodeGen/X86/cmov-double.ll
  test/CodeGen/X86/jump_sign.ll
  test/CodeGen/X86/zext-sext.ll

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7622.21317.patch
Type: text/x-patch
Size: 10939 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150305/0c06f3a1/attachment.bin>


More information about the llvm-commits mailing list