commit | 0a62474830f50b423329470caeb9a4e4da14a607 | [log] [tgz] |
---|---|---|
author | Chris Lattner <sabre@nondot.org> | Sun Dec 19 18:35:09 2010 +0000 |
committer | Chris Lattner <sabre@nondot.org> | Sun Dec 19 18:35:09 2010 +0000 |
tree | ff08ba86ca2158565d9c438e174ba0d1239d9d54 | |
parent | dd7e83737491b14ebf98e09fa6cb9b515f9f2e3e [diff] |
generalize the sadd creation code to not require that the sadd formed is half the size of the original type. We can now compile this into a sadd.i8: unsigned char X(char a, char b) { int res = a+b; if ((unsigned )(res+128) > 255U) abort(); return res; } git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122178 91177308-0d34-0410-b5e6-96231b3b80d8