summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/PowerPC/bitcast-peephole.mir
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/CodeGen/PowerPC/bitcast-peephole.mir')
-rw-r--r--llvm/test/CodeGen/PowerPC/bitcast-peephole.mir23
1 files changed, 23 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/PowerPC/bitcast-peephole.mir b/llvm/test/CodeGen/PowerPC/bitcast-peephole.mir
new file mode 100644
index 00000000000..15238576362
--- /dev/null
+++ b/llvm/test/CodeGen/PowerPC/bitcast-peephole.mir
@@ -0,0 +1,23 @@
+# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
+# RUN: llc -mtriple=powerpc64le-linux-gnu -run-pass=peephole-opt -verify-machineinstrs -o - %s | FileCheck %s
+
+---
+name: bitCast
+tracksRegLiveness: true
+body: |
+ bb.0.entry:
+ ; CHECK-LABEL: name: bitCast
+ ; CHECK: [[XXLEQVOnes:%[0-9]+]]:vsrc = XXLEQVOnes
+ ; CHECK: $v2 = COPY [[XXLEQVOnes]]
+ ; CHECK: BLR8 implicit $lr8, implicit $rm, implicit $v2
+ %0:vsrc = XXLEQVOnes
+ $v2 = COPY %0
+ BLR8 implicit $lr8, implicit $rm, implicit $v2
+
+...
+
+# This used to hit an assertion:
+# llvm/include/llvm/CodeGen/MachineInstr.h:417: const
+# llvm::MachineOperand &llvm::MachineInstr::getOperand(unsigned int)
+# const: Assertion `i < getNumOperands() && "getOperand() out of range!"' failed.
+#
OpenPOWER on IntegriCloud