[PATCH] D24147: Lower consecutive select instructions correctly.

Dehao Chen via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 1 11:58:14 PDT 2016


danielcdh created this revision.
danielcdh added a reviewer: davidxl.
danielcdh added a subscriber: llvm-commits.

If consecutive select instructions are lowered separately in CGP, it will introduce redundant condition check and branches that cannot be removed by later optimization phases. This patch lowers all consecutive select instructions at the same to to avoid inefficent code as demonstrated in https://llvm.org/bugs/show_bug.cgi?id=29095

https://reviews.llvm.org/D24147

Files:
  lib/CodeGen/CodeGenPrepare.cpp
  test/CodeGen/X86/codegen-prepare-select.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24147.70041.patch
Type: text/x-patch
Size: 7517 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160901/cd537012/attachment.bin>


More information about the llvm-commits mailing list