@@ -63,6 +63,31 @@ unsigned __int64 test__emulu(unsigned int a, unsigned int b) {
6363// CHECK: [[RES:%[0-9]+]] = mul nuw i64 [[Y]], [[X]]
6464// CHECK: ret i64 [[RES]]
6565
66+
67+ int test_inp (unsigned short port ) {
68+ return _inp (port );
69+ }
70+ // CHECK-LABEL: i32 @test_inp(i16 noundef
71+ // CHECK-SAME: [[PORT:%.*]])
72+ // CHECK: [[TMP0:%.*]] = tail call i32 asm sideeffect "inb ${1:w}, ${0:b}", "={ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i16 [[PORT]])
73+ // CHECK-NEXT: ret i32 [[TMP0]]
74+
75+ unsigned short test_inpw (unsigned short port ) {
76+ return _inpw (port );
77+ }
78+ // CHECK-LABEL: i16 @test_inpw(i16 noundef
79+ // CHECK-SAME: [[PORT:%.*]])
80+ // CHECK: [[TMP0:%.*]] = tail call i16 asm sideeffect "inw ${1:w}, ${0:w}", "={ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i16 [[PORT]])
81+ // CHECK-NEXT: ret i16 [[TMP0]]
82+
83+ unsigned long test_inpd (unsigned short port ) {
84+ return _inpd (port );
85+ }
86+ // CHECK-LABEL: i32 @test_inpd(i16 noundef
87+ // CHECK-SAME: [[PORT:%.*]])
88+ // CHECK: [[TMP0:%.*]] = tail call i32 asm sideeffect "inl ${1:w}, ${0:k}", "={ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i16 [[PORT]])
89+ // CHECK-NEXT: ret i32 [[TMP0]]
90+
6691#if defined(__x86_64__ )
6792
6893char test__readgsbyte (unsigned long Offset ) {
0 commit comments