Andrea Di Biagio
e46783d5b7
[CodeGenPrepare] Improved logic to speculate calls to cttz/ctlz.
...
This patch improves the logic added at revision 224899 (see review D6728) that
teaches the backend when it is profitable to speculate calls to cttz/ctlz.
The original algorithm conservatively avoided speculating more than one
instruction from a basic block in a control flow grap modelling an if-statement.
In particular, the only allowed instruction (excluding the terminator) was a
call to cttz/ctlz. However, there are cases where we could be less conservative
and still be able to speculate a call to cttz/ctlz.
With this patch, CodeGenPrepare now tries to speculate a cttz/ctlz if the
result is zero extended/truncated in the same basic block, and the zext/trunc
instruction is "free" for the target.
Added new test cases to CodeGen/X86/cttz-ctlz.ll
Differential Revision: http://reviews.llvm.org/D6853
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225274 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-06 17:41:18 +00:00
..
2014-12-15 19:07:53 +00:00
2014-12-15 19:07:53 +00:00
2014-12-15 19:07:53 +00:00
2014-12-15 19:07:53 +00:00
2014-12-15 19:07:53 +00:00
2014-12-15 19:07:53 +00:00
2014-12-15 19:07:53 +00:00
2014-12-15 19:07:53 +00:00
2014-12-15 19:07:53 +00:00
2014-12-15 19:07:53 +00:00
2014-12-15 19:07:53 +00:00
2014-12-15 19:07:53 +00:00
2014-12-15 19:07:53 +00:00
2014-12-15 19:07:53 +00:00
2014-12-15 19:07:53 +00:00
2014-12-15 19:07:53 +00:00
2014-12-15 19:07:53 +00:00
2014-12-15 19:07:53 +00:00
2014-12-15 19:07:53 +00:00
2014-12-15 19:07:53 +00:00
2014-12-16 20:15:45 +00:00
2014-12-15 19:07:53 +00:00
2014-12-15 19:07:53 +00:00
2014-12-15 19:07:53 +00:00
2014-12-06 01:28:50 +00:00
2014-12-06 01:28:50 +00:00
2014-12-15 22:34:58 +00:00
2014-12-17 17:52:12 +00:00
2014-12-15 19:07:53 +00:00
2014-12-11 23:07:52 +00:00
2014-12-06 01:31:07 +00:00
2014-12-18 12:28:22 +00:00
2014-12-23 10:30:39 +00:00
2014-12-11 10:21:12 +00:00
2014-12-22 13:52:48 +00:00
2014-12-12 17:02:18 +00:00
2014-12-15 19:07:53 +00:00
2014-12-09 18:45:30 +00:00
2014-12-12 15:10:43 +00:00
2014-12-16 18:24:07 +00:00
2014-12-23 09:36:28 +00:00
2014-12-12 15:10:43 +00:00
2014-12-16 18:24:07 +00:00
2014-12-23 10:30:39 +00:00
2014-12-18 12:28:22 +00:00
2014-12-22 13:52:48 +00:00
2014-12-12 17:02:18 +00:00
2014-12-15 19:07:53 +00:00
2014-12-12 15:10:43 +00:00
2014-12-15 19:07:53 +00:00
2014-12-28 13:15:05 +00:00
2014-12-16 21:57:18 +00:00
2014-12-16 20:15:45 +00:00
2014-12-16 20:15:45 +00:00
2014-12-16 20:15:45 +00:00
2014-12-16 20:15:45 +00:00
2014-12-22 18:11:52 +00:00
2014-12-02 22:31:23 +00:00
2014-12-02 22:31:23 +00:00
2014-12-08 18:18:32 +00:00
2014-12-20 02:19:22 +00:00
2014-12-03 23:38:08 +00:00
2014-12-15 19:07:53 +00:00
2015-01-06 17:41:18 +00:00
2014-12-15 19:07:53 +00:00
2014-12-15 19:07:53 +00:00
2014-12-15 19:07:53 +00:00
2014-12-24 23:06:55 +00:00
2014-12-24 23:06:55 +00:00
2014-12-10 16:58:54 +00:00
2014-12-15 19:07:53 +00:00
2014-12-28 23:37:11 +00:00
2014-12-19 22:19:48 +00:00
2014-12-19 22:19:48 +00:00
2014-12-15 19:07:53 +00:00
2014-12-09 06:10:44 +00:00
2014-12-15 19:07:53 +00:00
2014-12-05 20:55:53 +00:00
2014-12-04 13:49:51 +00:00
2014-12-01 21:04:44 +00:00
2014-12-01 21:04:44 +00:00
2014-12-15 19:07:53 +00:00
2014-12-15 19:07:53 +00:00
2014-12-09 06:10:44 +00:00
2014-12-09 06:10:44 +00:00
2014-12-09 06:10:44 +00:00
2014-12-15 19:07:53 +00:00
2014-12-28 15:20:57 +00:00
2014-12-08 14:36:51 +00:00
2014-12-08 17:47:18 +00:00
2014-12-15 19:07:53 +00:00
2014-12-15 19:07:53 +00:00
2014-12-28 08:54:45 +00:00
2014-12-09 06:10:44 +00:00
2014-12-31 00:40:28 +00:00
2014-12-15 19:07:53 +00:00
2014-12-16 20:15:45 +00:00
2014-12-16 20:15:45 +00:00
2014-12-15 19:07:53 +00:00
2014-12-11 11:30:20 +00:00
2014-12-22 23:58:37 +00:00
2014-12-22 23:58:37 +00:00
2014-12-15 19:07:53 +00:00
2014-12-15 19:07:53 +00:00
2014-12-15 19:07:53 +00:00
2014-12-15 19:07:53 +00:00
2014-12-16 20:15:45 +00:00
2014-12-15 19:07:53 +00:00
2014-12-15 19:07:53 +00:00
2014-12-16 20:15:45 +00:00
2014-12-16 20:15:45 +00:00
2014-12-15 19:07:53 +00:00
2014-12-15 19:07:53 +00:00
2014-12-15 19:07:53 +00:00
2014-12-24 22:44:29 +00:00
2014-12-16 20:15:45 +00:00
2014-12-03 02:08:38 +00:00
2014-12-03 02:08:38 +00:00
2014-12-15 19:07:53 +00:00
2014-12-15 19:07:53 +00:00
2014-12-16 20:15:45 +00:00
2014-12-19 22:19:48 +00:00
2014-12-30 20:05:19 +00:00
2014-12-21 16:48:42 +00:00
2014-12-01 21:04:44 +00:00
2014-12-15 19:07:53 +00:00
2014-12-15 19:07:53 +00:00
2014-12-16 20:15:45 +00:00
2014-12-04 00:56:38 +00:00
2014-12-15 19:07:53 +00:00
2014-12-06 01:31:07 +00:00
2014-12-02 22:31:23 +00:00
2014-12-19 22:16:28 +00:00
2014-12-15 13:18:21 +00:00
2014-12-15 19:07:53 +00:00
2014-12-01 04:27:03 +00:00
2014-12-15 19:07:53 +00:00
2014-12-15 19:07:53 +00:00
2014-12-02 18:50:36 +00:00
2014-12-29 23:55:33 +00:00
2014-12-02 18:50:36 +00:00
2014-12-02 18:50:36 +00:00
2014-11-29 21:17:05 +00:00
2014-12-16 23:41:59 +00:00
2014-12-01 21:04:44 +00:00
2015-01-06 07:12:52 +00:00
2014-12-16 16:30:01 +00:00
2014-12-15 19:07:53 +00:00
2014-12-15 19:07:53 +00:00
2014-12-16 20:15:45 +00:00
2014-12-17 12:32:17 +00:00
2014-12-16 21:57:18 +00:00
2014-12-23 00:35:23 +00:00
2014-12-22 19:45:43 +00:00
2014-12-06 01:31:07 +00:00
2014-12-07 17:15:53 +00:00
2014-12-07 17:15:53 +00:00
2014-12-07 17:15:53 +00:00
2015-01-04 19:08:03 +00:00
2014-12-23 08:59:45 +00:00
2014-12-07 17:16:00 +00:00
2015-01-04 17:52:00 +00:00
2014-12-06 01:31:07 +00:00
2014-12-15 22:45:48 +00:00
2014-12-12 15:10:43 +00:00
2014-12-05 12:13:30 +00:00
2014-12-15 19:07:53 +00:00
2014-12-19 22:19:48 +00:00
2014-12-15 19:07:53 +00:00