Nadav Rotem b078350872 This commit contains a few changes that had to go in together.
1. Simplify xor/and/or (bitcast(A), bitcast(B)) -> bitcast(op (A,B))
   (and also scalar_to_vector).

2. Xor/and/or are indifferent to the swizzle operation (shuffle of one src).
   Simplify xor/and/or (shuff(A), shuff(B)) -> shuff(op (A, B))

3. Optimize swizzles of shuffles:  shuff(shuff(x, y), undef) -> shuff(x, y).

4. Fix an X86ISelLowering optimization which was very bitcast-sensitive.

Code which was previously compiled to this:

movd    (%rsi), %xmm0
movdqa  .LCPI0_0(%rip), %xmm2
pshufb  %xmm2, %xmm0
movd    (%rdi), %xmm1
pshufb  %xmm2, %xmm1
pxor    %xmm0, %xmm1
pshufb  .LCPI0_1(%rip), %xmm1
movd    %xmm1, (%rdi)
ret

Now compiles to this:

movl    (%rsi), %eax
xorl    %eax, (%rdi)
ret

llvm-svn: 153848
2012-04-01 19:31:22 +00:00
..
2011-04-15 00:32:41 +00:00
2011-07-02 20:43:08 +00:00
2010-09-30 23:57:10 +00:00
2010-09-30 23:57:10 +00:00
2011-07-02 20:42:53 +00:00
2011-01-16 18:02:57 +00:00
2011-03-09 22:07:31 +00:00
2011-06-19 12:14:34 +00:00
2010-07-13 18:14:47 +00:00
2011-03-08 20:19:10 +00:00
2011-10-22 12:39:25 +00:00
2011-10-30 13:24:22 +00:00
2011-11-23 04:03:08 +00:00
2011-01-16 18:02:57 +00:00
2011-09-30 23:40:29 +00:00
2011-09-30 23:21:11 +00:00
2010-03-03 00:35:56 +00:00
2012-01-27 02:31:29 +00:00
2011-08-09 03:04:23 +00:00
2012-01-05 00:43:34 +00:00
2012-03-09 02:00:48 +00:00
2012-02-02 19:00:49 +00:00
2012-03-20 17:20:46 +00:00
2012-02-02 19:00:49 +00:00
2012-01-05 00:43:34 +00:00
2011-08-19 04:30:24 +00:00
2011-08-27 04:53:41 +00:00
2011-07-02 20:42:36 +00:00
2011-05-26 18:00:32 +00:00
2012-02-18 00:05:45 +00:00
2010-04-17 03:43:36 +00:00
2011-07-02 20:42:33 +00:00
2010-05-08 04:47:54 +00:00
2011-04-25 10:12:01 +00:00
2011-01-01 21:58:41 +00:00
2011-11-15 07:13:03 +00:00
2011-04-17 02:36:27 +00:00
2011-02-16 01:08:31 +00:00
2011-03-23 23:11:02 +00:00
2010-04-17 16:29:15 +00:00
2011-07-02 20:42:25 +00:00
2011-03-11 21:52:04 +00:00
2010-09-30 23:57:10 +00:00
2010-09-30 23:57:10 +00:00
2010-09-30 23:57:10 +00:00
2010-09-30 23:57:10 +00:00
2010-09-30 23:57:10 +00:00
2011-11-08 00:09:27 +00:00
2011-08-31 21:41:20 +00:00
2010-03-25 20:01:07 +00:00
2011-06-02 20:02:48 +00:00
2011-11-22 06:36:25 +00:00
2012-03-31 18:59:07 +00:00
2011-12-08 19:21:39 +00:00
2011-07-20 03:09:11 +00:00
2011-01-16 18:02:57 +00:00
2010-04-28 01:53:13 +00:00
2010-04-28 01:53:13 +00:00
2011-10-16 20:43:41 +00:00
2011-03-23 23:11:02 +00:00
2011-07-26 22:45:39 +00:00
2011-06-14 23:47:36 +00:00
2012-01-19 01:13:47 +00:00
2010-11-27 20:43:02 +00:00
2012-03-30 00:26:54 +00:00
2010-09-30 23:57:10 +00:00
2010-02-27 23:53:53 +00:00
2011-11-07 23:10:43 +00:00
2011-11-08 00:03:24 +00:00
2011-11-07 19:15:58 +00:00
2011-10-10 23:18:02 +00:00
2010-12-20 20:10:50 +00:00
2011-11-07 19:15:58 +00:00
2011-03-11 21:52:04 +00:00