| ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6 | |
| ; RUN: llc -mtriple=powerpc64le -mcpu=pwr10 -verify-machineinstrs < %s | \ | |
| ; RUN: FileCheck %s --implicit-check-not lxvdsx | |
| ; Ensure we don't emit a splatting load in addition to the regular vector load | |
| ; when the load has multiple uses through a bitcast. | |
| define dso_local <2 x i64> @test(ptr nofree noundef readonly captures(none) %ptr) local_unnamed_addr { | |
| ; CHECK-LABEL: test: | |
| ; CHECK: # %bb.0: # %entry | |
| ; CHECK-NEXT: lxv 34, 0(3) | |
| ; CHECK-NEXT: xxspltd 35, 34, 1 | |
| ; CHECK-NEXT: vaddudm 2, 3, 2 | |
| ; CHECK-NEXT: blr | |
| entry: | |
| %0 = load <16 x i8>, ptr %ptr, align 16 | |
| %1 = bitcast <16 x i8> %0 to <2 x i64> | |
| %shuffle = shufflevector <2 x i64> %1, <2 x i64> poison, <2 x i32> zeroinitializer | |
| %add = add <2 x i64> %shuffle, %1 | |
| ret <2 x i64> %add | |
| } |