Go to file
NAKAMURA Takumi 1705a999fa Reapply r165661, Patch by Shuxin Yang <shuxin.llvm@gmail.com>.
Original message:

The attached is the fix to radar://11663049. The optimization can be outlined by following rules:

   (select (x != c), e, c) -> select (x != c), e, x),
   (select (x == c), c, e) -> select (x == c), x, e)
where the <c> is an integer constant.

 The reason for this change is that : on x86, conditional-move-from-constant needs two instructions;
however, conditional-move-from-register need only one instruction.

  While the LowerSELECT() sounds to be the most convenient place for this optimization, it turns out to be a bad place. The reason is that by replacing the constant <c> with a symbolic value, it obscure some instruction-combining opportunities which would otherwise be very easy to spot. For that reason, I have to postpone the change to last instruction-combining phase.

  The change passes the test of "make check-all -C <build-root/test" and "make -C project/test-suite/SingleSource".

Original message since r165661:

My previous change has a bug: I negated the condition code of a CMOV, and go ahead creating a new CMOV using the *ORIGINAL* condition code.

llvm-svn: 166017
2012-10-16 06:28:34 +00:00
clang Use the Attributes::get method which takes an AttrVal value directly to simplify the code a bit. No functionality change. 2012-10-16 05:23:44 +00:00
clang-tools-extra Remove a trailing blank line, test commit. 2012-10-10 14:06:15 +00:00
compiler-rt [asan] fix lint 2012-10-16 04:50:32 +00:00
debuginfo-tests Fix this for gdb 7.4. 2012-07-23 19:41:58 +00:00
libclc Implement any() builtin. Patch by Tom Stellard! 2012-10-08 03:39:21 +00:00
libcxx Add an entry in CREDITS.TXT 2012-10-15 17:34:53 +00:00
libcxxabi Make the type_info for __shim_type_info visible. This should address some failing dynamic_casts that a few applications are doing on the type_info hierarchy. 2012-10-13 18:45:59 +00:00
lld * Add relocation reference support for Hexagon and PowerPC. 2012-10-09 02:20:47 +00:00
lldb Add a new ABI plugin method which specifies whether the architecture 2012-10-16 02:39:21 +00:00
llvm Reapply r165661, Patch by Shuxin Yang <shuxin.llvm@gmail.com>. 2012-10-16 06:28:34 +00:00
polly www: Clarify that GMP is LGPL licensed 2012-10-12 07:44:38 +00:00