[PATCH] D107880: [AArch64][SVE] Remove assertion/range check for i16 values during immediate selection
Usman Nadeem via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 11 14:55:30 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG9396c3ec7bdb: [AArch64][SVE] Remove assertion/range check for i16 values during immediate… (authored by mnadeem).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107880/new/
https://reviews.llvm.org/D107880
Files:
llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
llvm/test/CodeGen/AArch64/sve-int-arith-imm.ll
Index: llvm/test/CodeGen/AArch64/sve-int-arith-imm.ll
===================================================================
--- llvm/test/CodeGen/AArch64/sve-int-arith-imm.ll
+++ llvm/test/CodeGen/AArch64/sve-int-arith-imm.ll
@@ -800,4 +800,18 @@
ret <vscale x 4 x i32> %div
}
+;
+; UQSUB
+;
+define <vscale x 8 x i16> @uqsub(<vscale x 8 x i16> %a) {
+; CHECK-LABEL: uqsub:
+; CHECK: // %bb.0:
+; CHECK-NEXT: uqsub z0.h, z0.h, #32768 // =0x8000
+; CHECK-NEXT: ret
+ %cmp = icmp slt <vscale x 8 x i16> %a, shufflevector (<vscale x 8 x i16> insertelement (<vscale x 8 x i16> undef, i16 0, i32 0), <vscale x 8 x i16> undef, <vscale x 8 x i32> zeroinitializer)
+ %sub = xor <vscale x 8 x i16> %a, shufflevector (<vscale x 8 x i16> insertelement (<vscale x 8 x i16> undef, i16 -32768, i32 0), <vscale x 8 x i16> undef, <vscale x 8 x i32> zeroinitializer)
+ %sel = select <vscale x 8 x i1> %cmp, <vscale x 8 x i16> %sub, <vscale x 8 x i16> shufflevector (<vscale x 8 x i16> insertelement (<vscale x 8 x i16> undef, i16 0, i32 0), <vscale x 8 x i16> undef, <vscale x 8 x i32> zeroinitializer)
+ ret <vscale x 8 x i16> %sel
+}
+
attributes #0 = { minsize }
Index: llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
===================================================================
--- llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
+++ llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
@@ -3152,7 +3152,6 @@
Imm = CurDAG->getTargetConstant(ImmVal, DL, MVT::i32);
return true;
} else if ((ImmVal & 0xFF) == 0) {
- assert((ImmVal >= -32768) && (ImmVal <= 32512));
Shift = CurDAG->getTargetConstant(8, DL, MVT::i32);
Imm = CurDAG->getTargetConstant((ImmVal >> 8) & 0xFF, DL, MVT::i32);
return true;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107880.365860.patch
Type: text/x-patch
Size: 1766 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210811/f600ea08/attachment.bin>
More information about the llvm-commits
mailing list