; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py ; RUN: llc -mtriple=riscv32 -mattr=+experimental-p,+m,+zbb \ ; RUN: -verify-machineinstrs < %s | \ ; RUN: FileCheck --check-prefixes=CHECK-RV32 %s ; RUN: llc -mtriple=riscv64 -mattr=+experimental-p,+m,+zbb \ ; RUN: -verify-machineinstrs < %s | \ ; RUN: FileCheck --check-prefixes=CHECK-RV64 %s define i32 @pnot_v4i8(i32 %a) { ; CHECK-RV32-LABEL: pnot_v4i8: ; CHECK-RV32: # %bb.0: ; CHECK-RV32-NEXT: not a0, a0 ; CHECK-RV32-NEXT: ret ; ; CHECK-RV64-LABEL: pnot_v4i8: ; CHECK-RV64: # %bb.0: ; CHECK-RV64-NEXT: not a0, a0 ; CHECK-RV64-NEXT: ret %bc = bitcast i32 %a to <4 x i8> %not = xor <4 x i8> %bc, splat (i8 -1) %res = bitcast <4 x i8> %not to i32 ret i32 %res } define i32 @pnot_v2i16(i32 %a) { ; CHECK-RV32-LABEL: pnot_v2i16: ; CHECK-RV32: # %bb.0: ; CHECK-RV32-NEXT: not a0, a0 ; CHECK-RV32-NEXT: ret ; ; CHECK-RV64-LABEL: pnot_v2i16: ; CHECK-RV64: # %bb.0: ; CHECK-RV64-NEXT: not a0, a0 ; CHECK-RV64-NEXT: ret %bc = bitcast i32 %a to <2 x i16> %not = xor <2 x i16> %bc, splat (i16 -1) %res = bitcast <2 x i16> %not to i32 ret i32 %res } define i64 @pnot_v8i8(i64 %a) { ; CHECK-RV32-LABEL: pnot_v8i8: ; CHECK-RV32: # %bb.0: ; CHECK-RV32-NEXT: not a1, a1 ; CHECK-RV32-NEXT: not a0, a0 ; CHECK-RV32-NEXT: ret ; ; CHECK-RV64-LABEL: pnot_v8i8: ; CHECK-RV64: # %bb.0: ; CHECK-RV64-NEXT: not a0, a0 ; CHECK-RV64-NEXT: ret %bc = bitcast i64 %a to <8 x i8> %not = xor <8 x i8> %bc, splat (i8 -1) %res = bitcast <8 x i8> %not to i64 ret i64 %res } define i64 @pnot_v4i16(i64 %a) { ; CHECK-RV32-LABEL: pnot_v4i16: ; CHECK-RV32: # %bb.0: ; CHECK-RV32-NEXT: not a1, a1 ; CHECK-RV32-NEXT: not a0, a0 ; CHECK-RV32-NEXT: ret ; ; CHECK-RV64-LABEL: pnot_v4i16: ; CHECK-RV64: # %bb.0: ; CHECK-RV64-NEXT: not a0, a0 ; CHECK-RV64-NEXT: ret %bc = bitcast i64 %a to <4 x i16> %not = xor <4 x i16> %bc, splat (i16 -1) %res = bitcast <4 x i16> %not to i64 ret i64 %res } define i64 @pnot_v2i32(i64 %a) { ; CHECK-RV32-LABEL: pnot_v2i32: ; CHECK-RV32: # %bb.0: ; CHECK-RV32-NEXT: not a1, a1 ; CHECK-RV32-NEXT: not a0, a0 ; CHECK-RV32-NEXT: ret ; ; CHECK-RV64-LABEL: pnot_v2i32: ; CHECK-RV64: # %bb.0: ; CHECK-RV64-NEXT: not a0, a0 ; CHECK-RV64-NEXT: ret %bc = bitcast i64 %a to <2 x i32> %not = xor <2 x i32> %bc, splat (i32 -1) %res = bitcast <2 x i32> %not to i64 ret i64 %res }