| ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 6 |
| ; RUN: opt < %s -passes=instsimplify -S -mtriple=nvptx64-nvidia-cuda | FileCheck %s |
| |
| declare { i32, i1 } @llvm.nvvm.shfl.idx.i32p(i32, i32, i32) |
| |
| ; Test that dead shuffle instructions are eliminated. |
| define void @test_dead_shfl_const_zero(i32 %lane) #0 { |
| ; CHECK-LABEL: define void @test_dead_shfl_const_zero( |
| ; CHECK-SAME: i32 [[LANE:%.*]]) #[[ATTR1:[0-9]+]] { |
| ; CHECK-NEXT: ret void |
| ; |
| %r0 = call { i32, i1 } @llvm.nvvm.shfl.idx.i32p(i32 0, i32 %lane, i32 31) |
| %r1 = call { i32, i1 } @llvm.nvvm.shfl.idx.i32p(i32 0, i32 %lane, i32 31) |
| %r2 = call { i32, i1 } @llvm.nvvm.shfl.idx.i32p(i32 0, i32 %lane, i32 31) |
| %r3 = call { i32, i1 } @llvm.nvvm.shfl.idx.i32p(i32 0, i32 %lane, i32 31) |
| ret void |
| } |
| |
| attributes #0 = { convergent } |