Skip to content

Commit

Permalink
[tests] Add a test for constexpr mask as requested in D57372
Browse files Browse the repository at this point in the history
llvm-svn: 356285
  • Loading branch information
preames committed Mar 15, 2019
1 parent 98661d0 commit 6867b1f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion llvm/test/Transforms/InstCombine/masked_intrinsics.ll
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@ define <2 x double> @load_undefmask(<2 x double>* %ptr, <2 x double> %passthru)

}

define <2 x double> @load_cemask(<2 x double>* %ptr, <2 x double> %passthru) {
; CHECK-LABEL: @load_cemask(
; CHECK-NEXT: [[RES:%.*]] = call <2 x double> @llvm.masked.load.v2f64.p0v2f64(<2 x double>* [[PTR:%.*]], i32 2, <2 x i1> <i1 true, i1 false>, <2 x double> [[PASSTHRU:%.*]])
; CHECK-NEXT: ret <2 x double> [[RES]]
;
%res = call <2 x double> @llvm.masked.load.v2f64.p0v2f64(<2 x double>* %ptr, i32 2, <2 x i1> <i1 1, i1 trunc (i32 0 to i1)>, <2 x double> %passthru)
ret <2 x double> %res
}

define <2 x double> @load_lane0(<2 x double>* %ptr, double %pt) {
; CHECK-LABEL: @load_lane0(
; CHECK-NEXT: [[PTV1:%.*]] = insertelement <2 x double> undef, double [[PT:%.*]], i64 0
Expand All @@ -49,7 +58,6 @@ define <2 x double> @load_lane0(<2 x double>* %ptr, double %pt) {

}


define void @store_zeromask(<2 x double>* %ptr, <2 x double> %val) {
; CHECK-LABEL: @store_zeromask(
; CHECK-NEXT: ret void
Expand Down

0 comments on commit 6867b1f

Please sign in to comment.