[llvm] r362262 - [CVP] Add vector saturating add test; NFC
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Fri May 31 13:42:13 PDT 2019
Author: nikic
Date: Fri May 31 13:42:13 2019
New Revision: 362262
URL: http://llvm.org/viewvc/llvm-project?rev=362262&view=rev
Log:
[CVP] Add vector saturating add test; NFC
Extra test for the assertion failure from D62703.
Modified:
llvm/trunk/test/Transforms/CorrelatedValuePropagation/overflows.ll
Modified: llvm/trunk/test/Transforms/CorrelatedValuePropagation/overflows.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/CorrelatedValuePropagation/overflows.ll?rev=362262&r1=362261&r2=362262&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/CorrelatedValuePropagation/overflows.ll (original)
+++ llvm/trunk/test/Transforms/CorrelatedValuePropagation/overflows.ll Fri May 31 13:42:13 2019
@@ -27,6 +27,7 @@ declare i8 @llvm.uadd.sat.i8(i8, i8)
declare i8 @llvm.sadd.sat.i8(i8, i8)
declare i8 @llvm.usub.sat.i8(i8, i8)
declare i8 @llvm.ssub.sat.i8(i8, i8)
+declare <2 x i8> @llvm.uadd.sat.v2i8(<2 x i8>, <2 x i8>)
declare void @llvm.trap()
@@ -834,3 +835,12 @@ cont:
%res = call i8 @llvm.ssub.sat.i8(i8 %x, i8 20)
ret i8 %res
}
+
+define <2 x i8> @uadd_sat_vec(<2 x i8> %a) {
+; CHECK-LABEL: @uadd_sat_vec(
+; CHECK-NEXT: [[ADD:%.*]] = call <2 x i8> @llvm.uadd.sat.v2i8(<2 x i8> [[A:%.*]], <2 x i8> <i8 1, i8 1>)
+; CHECK-NEXT: ret <2 x i8> [[ADD]]
+;
+ %add = call <2 x i8> @llvm.uadd.sat.v2i8(<2 x i8> %a, <2 x i8> <i8 1, i8 1>)
+ ret <2 x i8> %add
+}
More information about the llvm-commits
mailing list