diff options
Diffstat (limited to 'test/CodeGen/ms-intrinsics-other.c')
-rw-r--r-- | test/CodeGen/ms-intrinsics-other.c | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/test/CodeGen/ms-intrinsics-other.c b/test/CodeGen/ms-intrinsics-other.c index 65d767058462..adc8ac98e573 100644 --- a/test/CodeGen/ms-intrinsics-other.c +++ b/test/CodeGen/ms-intrinsics-other.c @@ -148,3 +148,51 @@ LONG test_InterlockedDecrement(LONG volatile *Addend) { // CHECK: [[RESULT:%[0-9]+]] = add i32 [[TMP]], -1 // CHECK: ret i32 [[RESULT]] // CHECK: } + +unsigned short test__lzcnt16(unsigned short x) { + return __lzcnt16(x); +} +// CHECK: i16 @test__lzcnt16 +// CHECK: [[RESULT:%[0-9]+]] = tail call i16 @llvm.ctlz.i16(i16 %x, i1 false) +// CHECK: ret i16 [[RESULT]] +// CHECK: } + +unsigned int test__lzcnt(unsigned int x) { + return __lzcnt(x); +} +// CHECK: i32 @test__lzcnt +// CHECK: [[RESULT:%[0-9]+]] = tail call i32 @llvm.ctlz.i32(i32 %x, i1 false) +// CHECK: ret i32 [[RESULT]] +// CHECK: } + +unsigned __int64 test__lzcnt64(unsigned __int64 x) { + return __lzcnt64(x); +} +// CHECK: i64 @test__lzcnt64 +// CHECK: [[RESULT:%[0-9]+]] = tail call i64 @llvm.ctlz.i64(i64 %x, i1 false) +// CHECK: ret i64 [[RESULT]] +// CHECK: } + +unsigned short test__popcnt16(unsigned short x) { + return __popcnt16(x); +} +// CHECK: i16 @test__popcnt16 +// CHECK: [[RESULT:%[0-9]+]] = tail call i16 @llvm.ctpop.i16(i16 %x) +// CHECK: ret i16 [[RESULT]] +// CHECK: } + +unsigned int test__popcnt(unsigned int x) { + return __popcnt(x); +} +// CHECK: i32 @test__popcnt +// CHECK: [[RESULT:%[0-9]+]] = tail call i32 @llvm.ctpop.i32(i32 %x) +// CHECK: ret i32 [[RESULT]] +// CHECK: } + +unsigned __int64 test__popcnt64(unsigned __int64 x) { + return __popcnt64(x); +} +// CHECK: i64 @test__popcnt64 +// CHECK: [[RESULT:%[0-9]+]] = tail call i64 @llvm.ctpop.i64(i64 %x) +// CHECK: ret i64 [[RESULT]] +// CHECK: } |