1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
llvm-mirror/test
Evan Cheng 0b6bcb6e06 This is another case where instcombine demanded bits optimization created
large immediates. Add dag combine logic to recover in case the large
immediates doesn't fit in cmp immediate operand field.

int foo(unsigned long l) {
  return (l>> 47) == 1;
}

we produce

  %shr.mask = and i64 %l, -140737488355328
  %cmp = icmp eq i64 %shr.mask, 140737488355328
  %conv = zext i1 %cmp to i32
  ret i32 %conv

which codegens to

movq    $0xffff800000000000,%rax
andq    %rdi,%rax
movq    $0x0000800000000000,%rcx
cmpq    %rcx,%rax
sete    %al
movzbl    %al,%eax
ret

TargetLowering::SimplifySetCC would transform
(X & -256) == 256 -> (X >> 8) == 1
if the immediate fails the isLegalICmpImmediate() test. For x86,
that's immediates which are not a signed 32-bit immediate.

Based on a patch by Eli Friedman.

PR10328
rdar://9758774

llvm-svn: 160346
2012-07-17 06:53:39 +00:00
..
Analysis Fix the remaining TCL-style quotes found in the testsuite. This is 2012-07-02 19:09:46 +00:00
Archive
Assembler Fix the remaining TCL-style quotes found in the testsuite. This is 2012-07-02 19:09:46 +00:00
Bindings/Ocaml Fix the remaining TCL-style quotes found in the testsuite. This is 2012-07-02 19:09:46 +00:00
Bitcode This is one of the first steps at moving to replace target-dependent 2012-07-13 23:25:25 +00:00
BugPoint
CodeGen This is another case where instcombine demanded bits optimization created 2012-07-17 06:53:39 +00:00
DebugInfo The end of the prologue should be marked with is_stmt. 2012-07-12 23:30:25 +00:00
ExecutionEngine Add Mips to the list of target architectures for the MCJIT tests. 2012-06-21 20:23:32 +00:00
Feature Convert the uses of '|&' to use '2>&1 |' instead, which works on old 2012-07-02 18:37:59 +00:00
Instrumentation [asan] refactor instrumentation to allow merging the crash callbacks (not fully implemented yet, no functionality change except the BB order) 2012-07-16 16:15:40 +00:00
Integer Convert all tests using TCL-style quoting to use shell-style quoting. 2012-07-02 12:47:22 +00:00
Linker Convert the uses of '|&' to use '2>&1 |' instead, which works on old 2012-07-02 18:37:59 +00:00
MC Doubleword Shift Left Logical Plus 32 2012-07-16 15:14:51 +00:00
Object Add relocation types for Hexagon processor; patch by Sidney Manning <sidneym@codeaurora.org> 2012-06-23 14:46:18 +00:00
Other Fix the remaining TCL-style quotes found in the testsuite. This is 2012-07-02 19:09:46 +00:00
Scripts This allows hello world to be compiled for Mips 64 direct object. 2012-06-27 22:48:25 +00:00
TableGen Convert all tests using TCL-style quoting to use shell-style quoting. 2012-07-02 12:47:22 +00:00
Transforms fix PR13339 (remove the predecessor from the unwind BB when removing an invoke) 2012-07-16 22:49:40 +00:00
Unit
Verifier Fix the remaining TCL-style quotes found in the testsuite. This is 2012-07-02 19:09:46 +00:00
YAMLParser Convert the uses of '|&' to use '2>&1 |' instead, which works on old 2012-07-02 18:37:59 +00:00
CMakeLists.txt llvm/test/CMakeLists.txt: Add llvm-diff to deps. 2012-07-12 10:15:48 +00:00
lit.cfg llvm/test/lit.cfg: Retweak for Win32 to fix testing. 2012-07-03 03:59:34 +00:00
lit.site.cfg.in Remove 'site.exp' building from both CMake and configure+make. 2012-06-28 00:16:51 +00:00
Makefile Remove 'site.exp' building from both CMake and configure+make. 2012-06-28 00:16:51 +00:00
Makefile.tests
TestRunner.sh