mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
Add a few missed xforms from GCC PR14753
llvm-svn: 125681
This commit is contained in:
parent
47e45a32a8
commit
9f4e529571
@ -2218,3 +2218,32 @@ llc time when it gets inlined, because we can use smaller transfers. This also
|
||||
avoids partial register stalls in some important cases.
|
||||
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
||||
Some missed instcombine xforms (from GCC PR14753):
|
||||
|
||||
void bar (void);
|
||||
|
||||
void mask_gt (unsigned int a) {
|
||||
/* This is equivalent to a > 15. */
|
||||
if ((a & ~7) > 8)
|
||||
bar();
|
||||
}
|
||||
|
||||
void neg_eq_cst(unsigned int a) {
|
||||
if (-a == 123)
|
||||
bar();
|
||||
}
|
||||
|
||||
void minus_cst(unsigned int a) {
|
||||
if (20 - a == 5)
|
||||
bar();
|
||||
}
|
||||
|
||||
void rotate_cst (unsigned a) {
|
||||
a = (a << 10) | (a >> 22);
|
||||
if (a == 123)
|
||||
bar ();
|
||||
}
|
||||
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user