Simon Pilgrim | fc4d4b2 | 2016-07-19 13:35:11 +0000 | [diff] [blame] | 1 | ; RUN: llc < %s -mtriple=arm64-eabi | FileCheck %s |
Tim Northover | 5b06f27 | 2014-04-03 09:36:05 +0000 | [diff] [blame] | 2 | |
| 3 | ; This is mostly a "don't assert" test. The type of the RHS of a shift depended |
| 4 | ; on the phase of legalization, which led to the creation of an unexpected and |
| 5 | ; unselectable "rotr" node: (i32 (rotr i32, i64)). |
| 6 | |
Robert Lougher | a9bf246 | 2014-04-15 18:34:24 +0000 | [diff] [blame] | 7 | ; FIXME: This test is xfailed because it relies on an optimization that has |
| 8 | ; been reverted (see PR17975). |
| 9 | ; XFAIL: * |
| 10 | |
Tim Northover | 5b06f27 | 2014-04-03 09:36:05 +0000 | [diff] [blame] | 11 | define void @foo(i64* nocapture %d) { |
| 12 | ; CHECK-LABEL: foo: |
| 13 | ; CHECK: rorv |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 14 | %tmp = load i64, i64* undef, align 8 |
Tim Northover | 5b06f27 | 2014-04-03 09:36:05 +0000 | [diff] [blame] | 15 | %sub397 = sub i64 0, %tmp |
| 16 | %and398 = and i64 %sub397, 4294967295 |
| 17 | %shr404 = lshr i64 %and398, 0 |
| 18 | %or405 = or i64 0, %shr404 |
| 19 | %xor406 = xor i64 %or405, 0 |
| 20 | %xor417 = xor i64 0, %xor406 |
| 21 | %xor428 = xor i64 0, %xor417 |
| 22 | %sub430 = sub i64 %xor417, 0 |
| 23 | %and431 = and i64 %sub430, 4294967295 |
| 24 | %and432 = and i64 %xor428, 31 |
| 25 | %sub433 = sub i64 32, %and432 |
| 26 | %shl434 = shl i64 %and431, %sub433 |
| 27 | %shr437 = lshr i64 %and431, %and432 |
| 28 | %or438 = or i64 %shl434, %shr437 |
| 29 | %xor439 = xor i64 %or438, %xor428 |
| 30 | %sub441 = sub i64 %xor439, 0 |
| 31 | store i64 %sub441, i64* %d, align 8 |
| 32 | ret void |
| 33 | } |