Bill Wendling
43a6c5e2fc
We have a chance for an optimization. Consider this code:
...
int x(int t) {
if (t & 256)
return -26;
return 0;
}
We generate this:
tst.w r0, #256
mvn r0, #25
it eq
moveq r0, #0
while gcc generates this:
ands r0, r0, #256
it ne
mvnne r0, #25
bx lr
Scandalous really!
During ISel time, we can look for this particular pattern. One where we have a
"MOVCC" that uses the flag off of a CMPZ that itself is comparing an AND
instruction to 0. Something like this (greatly simplified):
%r0 = ISD::AND ...
ARMISD::CMPZ %r0, 0 @ sets [CPSR]
%r0 = ARMISD::MOVCC 0, -26 @ reads [CPSR]
All we have to do is convert the "ISD::AND" into an "ARM::ANDS" that sets [CPSR]
when it's zero. The zero value will all ready be in the %r0 register and we only
need to change it if the AND wasn't zero. Easy!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112664 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-31 22:41:22 +00:00
..
2010-08-30 10:48:29 +00:00
2010-05-02 15:36:26 +00:00
2010-05-02 15:36:26 +00:00
2010-05-02 15:36:26 +00:00
2010-08-30 10:48:29 +00:00
2010-06-15 21:58:33 +00:00
2010-06-15 21:58:33 +00:00
2010-05-07 17:03:48 +00:00
2010-06-15 21:58:33 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-15 20:42:00 +00:00
2010-06-15 20:42:00 +00:00
2010-06-15 20:42:00 +00:00
2010-06-15 20:42:00 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-07-01 21:55:59 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-15 19:04:29 +00:00
2010-06-15 19:04:29 +00:00
2010-03-17 17:52:21 +00:00
2010-06-15 05:56:31 +00:00
2010-05-21 21:05:32 +00:00
2010-08-16 23:44:29 +00:00
2010-03-04 21:42:36 +00:00
2010-03-04 21:04:38 +00:00
2010-03-20 22:20:40 +00:00
2010-04-07 20:43:35 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-05-15 02:18:07 +00:00
2010-05-18 00:03:40 +00:00
2010-05-17 17:18:59 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-05-20 18:39:53 +00:00
2010-08-27 17:13:24 +00:00
2010-08-27 17:13:24 +00:00
2010-08-27 17:13:24 +00:00
2010-06-21 21:21:14 +00:00
2010-08-13 22:43:33 +00:00
2010-06-25 23:14:54 +00:00
2010-06-28 23:40:25 +00:00
2010-08-27 17:13:24 +00:00
2010-06-29 18:42:49 +00:00
2010-07-26 18:45:39 +00:00
2010-08-04 21:56:30 +00:00
2010-07-09 20:27:06 +00:00
2010-04-17 21:29:25 +00:00
2010-04-17 21:29:25 +00:00
2010-08-06 15:35:32 +00:00
2010-06-15 19:04:29 +00:00
2010-03-17 17:52:21 +00:00
2010-06-22 22:04:24 +00:00
2010-06-15 19:04:29 +00:00
2010-07-17 03:30:54 +00:00
2010-04-22 23:24:18 +00:00
2010-08-13 22:43:33 +00:00
2010-06-04 01:01:04 +00:00
2010-08-17 01:20:36 +00:00
2010-06-18 20:59:25 +00:00
2010-08-11 07:17:46 +00:00
2010-05-21 00:43:17 +00:00
2010-05-21 00:43:17 +00:00
2010-08-25 07:57:29 +00:00
2010-05-21 00:43:17 +00:00
2010-06-24 22:00:37 +00:00
2010-05-21 00:43:17 +00:00
2010-05-21 00:43:17 +00:00
2010-05-21 00:43:17 +00:00
2010-03-25 23:47:34 +00:00
2010-03-25 23:47:34 +00:00
2010-05-21 00:43:17 +00:00
2010-03-14 18:42:52 +00:00
2010-03-25 23:47:34 +00:00
2010-07-15 22:07:12 +00:00
2010-06-17 15:18:27 +00:00
2010-08-30 10:48:29 +00:00
2010-03-25 23:47:34 +00:00
2010-04-17 16:29:15 +00:00
2010-04-17 16:29:15 +00:00
2010-06-18 23:09:54 +00:00
2010-05-03 14:35:47 +00:00
2010-06-23 18:56:06 +00:00
2010-03-16 16:19:07 +00:00
2010-03-16 16:19:07 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-05-27 22:08:38 +00:00
2010-06-04 01:01:24 +00:00
2010-06-04 01:01:24 +00:00
2010-03-17 17:52:21 +00:00
2010-08-11 01:05:02 +00:00
2010-06-25 22:42:03 +00:00
2010-08-10 22:16:05 +00:00
2010-06-04 23:28:13 +00:00
2010-05-15 18:16:59 +00:00
2010-08-31 22:41:22 +00:00
2010-02-24 22:15:53 +00:00
2010-08-17 17:23:19 +00:00
2010-08-27 17:13:24 +00:00
2010-08-18 22:22:44 +00:00
2010-04-15 05:28:43 +00:00
2010-06-17 15:18:27 +00:00
2010-08-11 08:43:16 +00:00
2010-08-27 17:13:24 +00:00
2010-03-17 17:52:21 +00:00
2010-07-14 17:45:16 +00:00
2010-08-30 23:41:49 +00:00
2010-03-17 17:52:21 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-07-11 04:01:49 +00:00
2010-08-04 00:12:08 +00:00
2010-08-29 05:57:34 +00:00
2010-05-19 01:08:17 +00:00
2010-07-14 01:22:12 +00:00
2010-08-17 05:54:34 +00:00
2010-07-06 16:24:34 +00:00
2010-08-27 17:13:24 +00:00
2010-08-27 17:13:24 +00:00
2010-08-27 17:13:24 +00:00
2010-08-27 17:13:24 +00:00
2010-08-27 17:13:24 +00:00
2010-05-03 22:36:46 +00:00
2010-05-03 22:36:46 +00:00
2010-08-30 20:02:30 +00:00
2010-05-03 22:36:46 +00:00
2010-05-03 22:36:46 +00:00
2010-08-17 05:54:34 +00:00
2010-08-27 17:13:24 +00:00
2010-08-27 17:13:24 +00:00
2010-08-27 23:18:17 +00:00
2010-08-27 17:13:24 +00:00
2010-08-27 17:13:24 +00:00
2010-08-29 05:57:34 +00:00
2010-08-17 05:54:34 +00:00
2010-08-17 05:54:34 +00:00
2010-08-17 05:54:34 +00:00