mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-21 18:29:46 +00:00
Remove some stuff that's already implemented. Also, remove the note about
merging x >u 5 and x <s 20 because it's impossible to implement. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91228 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
55df144a78
commit
1555473387
@ -823,20 +823,6 @@ int main() {
|
||||
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
||||
Instcombine will merge comparisons like (x >= 10) && (x < 20) by producing (x -
|
||||
10) u< 10, but only when the comparisons have matching sign.
|
||||
|
||||
This could be converted with a similiar technique. (PR1941)
|
||||
|
||||
define i1 @test(i8 %x) {
|
||||
%A = icmp uge i8 %x, 5
|
||||
%B = icmp slt i8 %x, 20
|
||||
%C = and i1 %A, %B
|
||||
ret i1 %C
|
||||
}
|
||||
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
||||
These functions perform the same computation, but produce different assembly.
|
||||
|
||||
define i8 @select(i8 %x) readnone nounwind {
|
||||
@ -884,18 +870,6 @@ The expression should optimize to something like
|
||||
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
||||
From GCC Bug 15241:
|
||||
unsigned int
|
||||
foo (unsigned int a, unsigned int b)
|
||||
{
|
||||
if (a <= 7 && b <= 7)
|
||||
baz ();
|
||||
}
|
||||
Should combine to "(a|b) <= 7". Currently not optimized with "clang
|
||||
-emit-llvm-bc | opt -std-compile-opts".
|
||||
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
||||
From GCC Bug 3756:
|
||||
int
|
||||
pn (int n)
|
||||
@ -907,19 +881,6 @@ Should combine to (n >> 31) | 1. Currently not optimized with "clang
|
||||
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
||||
From GCC Bug 28685:
|
||||
int test(int a, int b)
|
||||
{
|
||||
int lt = a < b;
|
||||
int eq = a == b;
|
||||
|
||||
return (lt || eq);
|
||||
}
|
||||
Should combine to "a <= b". Currently not optimized with "clang
|
||||
-emit-llvm-bc | opt -std-compile-opts | llc".
|
||||
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
||||
void a(int variable)
|
||||
{
|
||||
if (variable == 4 || variable == 6)
|
||||
@ -993,12 +954,6 @@ Should combine to 0. Currently not optimized with "clang
|
||||
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
||||
int a(unsigned char* b) {return *b > 99;}
|
||||
There's an unnecessary zext in the generated code with "clang
|
||||
-emit-llvm-bc | opt -std-compile-opts".
|
||||
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
||||
int a(unsigned b) {return ((b << 31) | (b << 30)) >> 31;}
|
||||
Should be combined to "((b >> 1) | b) & 1". Currently not optimized
|
||||
with "clang -emit-llvm-bc | opt -std-compile-opts".
|
||||
@ -1011,12 +966,6 @@ Should combine to "x | (y & 3)". Currently not optimized with "clang
|
||||
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
||||
unsigned a(unsigned a) {return ((a | 1) & 3) | (a & -4);}
|
||||
Should combine to "a | 1". Currently not optimized with "clang
|
||||
-emit-llvm-bc | opt -std-compile-opts".
|
||||
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
||||
int a(int a, int b, int c) {return (~a & c) | ((c|a) & b);}
|
||||
Should fold to "(~a & c) | (a & b)". Currently not optimized with
|
||||
"clang -emit-llvm-bc | opt -std-compile-opts".
|
||||
|
Loading…
Reference in New Issue
Block a user