Debian Codegraph @

llvm/test/CodeGen/SPIRV/no-opbitcast-between-identical-types.ll

raw
1 ; The goal of the test case is to ensure that no OpBitcast is generated for a bitcast between identical types.
2
3 ; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv-unknown-unknown %s -o - | FileCheck %s
4 ; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-unknown-unknown %s -o - -filetype=obj | spirv-val %}
5
6 ; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv64-unknown-unknown %s -o - | FileCheck %s
7 ; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv64-unknown-unknown %s -o - -filetype=obj | spirv-val %}
8
9 ; CHECK: OpFunction
10 ; CHECK-NO: OpBitcast
11 ; CHECK: OpReturn
12
13 define void @foo() {
14 entry:
15 %r = bitcast i32 0 to i32
16 ret void
17 }