Weiming Zhao
fa1cf8cd68
[ARM64] Prevent bit extraction to be adjusted by following shift
...
For pattern like ((x >> C1) & Mask) << C2, DAG combiner may convert it
into (x >> (C1-C2)) & (Mask << C2), which makes pattern matching of ubfx
more difficult.
For example:
Given
%shr = lshr i64 %x, 4
%and = and i64 %shr, 15
%arrayidx = getelementptr inbounds [8 x [64 x i64]]* @arr, i64 0, %i64 2, i64 %and
%0 = load i64* %arrayidx
With current shift folding, it takes 3 instrs to compute base address:
lsr x8, x0, #1
and x8, x8, #0x78
add x8, x9, x8
If using ubfx, it only needs 2 instrs:
ubfx x8, x0, #4 , #4
add x8, x9, x8, lsl #3
This fixes bug 19589
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207702 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-30 21:07:24 +00:00
..
2014-04-30 11:19:15 +00:00
2014-04-15 13:59:53 +00:00
2014-04-22 09:57:06 +00:00
2014-04-28 07:34:27 +00:00
2014-04-29 07:51:19 +00:00
2014-04-25 12:07:03 +00:00
2014-04-30 11:19:15 +00:00
2014-04-16 15:28:02 +00:00
2014-04-16 15:28:02 +00:00
2014-04-16 15:28:02 +00:00
2014-04-16 15:28:02 +00:00
2014-04-16 15:28:02 +00:00
2014-04-16 15:28:02 +00:00
2014-04-16 15:28:02 +00:00
2014-04-30 11:19:28 +00:00
2014-04-18 12:50:58 +00:00
2014-04-18 13:16:55 +00:00
2014-04-22 10:10:14 +00:00
2014-04-18 14:54:53 +00:00
2014-04-22 12:45:32 +00:00
2014-04-22 12:45:32 +00:00
2014-04-24 12:11:46 +00:00
2014-04-22 12:45:32 +00:00
2014-04-30 11:19:40 +00:00
2014-04-09 14:43:50 +00:00
2014-04-15 19:08:46 +00:00
2014-04-09 14:47:27 +00:00
2014-04-17 20:47:31 +00:00
2014-04-30 11:19:15 +00:00
2014-04-28 16:21:50 +00:00
2014-04-23 20:43:38 +00:00
2014-03-31 22:14:04 +00:00
2014-04-15 19:08:46 +00:00
2014-04-30 13:37:07 +00:00
2014-04-14 21:05:02 +00:00
2014-04-17 20:00:33 +00:00
2014-04-30 11:19:40 +00:00
2014-04-02 14:39:11 +00:00
2014-04-30 11:19:15 +00:00
2014-04-30 21:07:24 +00:00
2014-04-09 14:47:27 +00:00
2014-04-11 22:27:58 +00:00
2014-04-17 20:47:31 +00:00
2014-04-18 14:54:46 +00:00
2014-04-23 06:22:48 +00:00
2014-04-30 11:19:40 +00:00
2014-04-25 09:25:42 +00:00
2014-04-23 06:22:48 +00:00
2014-04-16 11:52:51 +00:00
2014-04-12 00:59:48 +00:00
2014-04-30 11:19:15 +00:00
2014-04-03 20:51:08 +00:00
2014-04-18 09:31:20 +00:00
2014-04-15 19:08:46 +00:00
2014-04-29 01:50:36 +00:00
2014-04-17 20:47:31 +00:00
2014-04-02 14:39:11 +00:00
2014-04-30 11:19:40 +00:00
2014-04-09 14:43:50 +00:00
2014-04-15 19:08:46 +00:00
2014-04-09 14:43:50 +00:00
2014-04-30 09:32:01 +00:00
2014-04-30 11:19:40 +00:00
2014-04-30 13:14:03 +00:00
2014-04-30 11:19:40 +00:00
2014-04-30 16:13:34 +00:00
2014-04-30 15:29:57 +00:00
2014-04-30 11:19:28 +00:00
2014-04-16 09:13:44 +00:00
2014-04-30 11:19:28 +00:00
2014-04-08 12:23:51 +00:00
2014-03-31 15:46:30 +00:00
2014-04-25 10:25:29 +00:00
2014-04-30 11:19:40 +00:00
2014-03-31 00:02:10 +00:00
2014-04-09 14:43:59 +00:00
2014-04-09 14:43:59 +00:00
2014-04-02 14:39:07 +00:00
2014-04-01 10:37:09 +00:00
2014-04-17 20:00:24 +00:00
2014-04-30 13:37:07 +00:00
2014-04-30 11:19:40 +00:00
2014-04-18 21:22:04 +00:00
2014-04-30 11:19:40 +00:00
2014-03-31 15:46:42 +00:00
2014-04-04 14:49:30 +00:00
2014-04-30 11:19:40 +00:00
2014-04-25 13:43:18 +00:00
2014-04-15 19:08:46 +00:00
2014-04-23 06:22:48 +00:00
2014-04-30 11:19:40 +00:00
2014-04-15 18:34:24 +00:00
2014-04-09 14:43:59 +00:00
2014-04-14 12:59:52 +00:00
2014-04-15 19:08:46 +00:00
2014-04-25 10:25:29 +00:00
2014-04-15 19:08:46 +00:00
2014-04-03 07:06:13 +00:00
2014-04-16 12:03:56 +00:00
2014-04-01 10:37:09 +00:00
2014-03-31 22:14:04 +00:00
2014-04-15 19:08:46 +00:00
2014-04-24 12:11:53 +00:00
2014-04-15 19:08:46 +00:00
2014-04-18 14:54:41 +00:00
2014-04-30 11:19:28 +00:00
2014-04-17 20:47:31 +00:00
2014-03-31 15:46:17 +00:00
2014-04-15 19:08:46 +00:00
2014-04-30 11:19:40 +00:00
2014-04-09 06:55:39 +00:00
2014-04-02 14:38:54 +00:00
2014-04-15 19:08:46 +00:00
2014-04-30 11:19:28 +00:00
2014-04-30 16:13:34 +00:00
2014-04-30 16:13:34 +00:00
2014-04-09 07:07:02 +00:00
2014-04-17 01:01:37 +00:00
2014-03-31 15:46:26 +00:00
2014-04-22 09:57:06 +00:00
2014-04-18 14:54:35 +00:00
2014-04-15 19:08:46 +00:00
2014-04-30 11:19:28 +00:00
2014-03-31 15:46:22 +00:00
2014-03-31 15:46:46 +00:00
2014-04-30 13:14:03 +00:00