define i32 @f0(i32* nocapture %x) nounwind readonly ssp {
entry:
- %tmp1 = load i32* %x ; <i32> [#uses=2]
+ %tmp1 = load i32, i32* %x ; <i32> [#uses=2]
%tobool = icmp eq i32 %tmp1, 0 ; <i1> [#uses=1]
br i1 %tobool, label %if.end, label %return
return: ; preds = %entry
ret i32 0
}
+
+define i32 @f1() nounwind {
+ %ax = tail call i16 asm sideeffect "", "={ax},~{dirflag},~{fpsr},~{flags}"()
+ %conv = sext i16 %ax to i32
+ ret i32 %conv
+
+; CHECK-LABEL: f1:
+; CHECK: cwtl ## encoding: [0x98]
+}
+
+define i64 @f2() nounwind {
+ %eax = tail call i32 asm sideeffect "", "={ax},~{dirflag},~{fpsr},~{flags}"()
+ %conv = sext i32 %eax to i64
+ ret i64 %conv
+
+; CHECK-LABEL: f2:
+; CHECK: cltq ## encoding: [0x48,0x98]
+}