Matt Arsenault | 4bf43d4 | 2015-09-25 17:27:08 +0000 | [diff] [blame^] | 1 | ; RUN: llc -march=amdgcn -verify-machineinstrs < %s | FileCheck -check-prefix=GCN %s |
| 2 | |
| 3 | ; How the replacement of i64 stores with v2i32 stores resulted in |
| 4 | ; breaking other users of the bitcast if they already existed |
| 5 | |
| 6 | ; GCN-LABEL: {{^}}extract_vector_elt_select_error: |
| 7 | ; GCN: buffer_store_dword |
| 8 | ; GCN: buffer_store_dword |
| 9 | ; GCN: buffer_store_dwordx2 |
| 10 | define void @extract_vector_elt_select_error(i32 addrspace(1)* %out, i64 addrspace(1)* %in, i64 %val) nounwind { |
| 11 | %vec = bitcast i64 %val to <2 x i32> |
| 12 | %elt0 = extractelement <2 x i32> %vec, i32 0 |
| 13 | %elt1 = extractelement <2 x i32> %vec, i32 1 |
| 14 | |
| 15 | store volatile i32 %elt0, i32 addrspace(1)* %out |
| 16 | store volatile i32 %elt1, i32 addrspace(1)* %out |
| 17 | store volatile i64 %val, i64 addrspace(1)* %in |
| 18 | ret void |
| 19 | } |