File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -400,6 +400,25 @@ entry:
400
400
ret double %rem
401
401
}
402
402
403
+ ; Verify that fptosi(%x) isn't simplified when the rounding mode is
404
+ ; unknown. The expansion should have only one conversion instruction.
405
+ ; Verify that no gross errors happen.
406
+ define i32 @f20s (double %x ) #0 {
407
+ ; SSE-LABEL: f20s:
408
+ ; SSE: # %bb.0: # %entry
409
+ ; SSE-NEXT: cvttsd2si %xmm0, %eax
410
+ ; SSE-NEXT: retq
411
+ ;
412
+ ; AVX-LABEL: f20s:
413
+ ; AVX: # %bb.0: # %entry
414
+ ; AVX-NEXT: vcvttsd2si %xmm0, %eax
415
+ ; AVX-NEXT: retq
416
+ entry:
417
+ %result = call i32 @llvm.experimental.constrained.fptosi.i32.f64 (double %x ,
418
+ metadata !"fpexcept.strict" ) #0
419
+ ret i32 %result
420
+ }
421
+
403
422
; Verify that fptoui(%x) isn't simplified when the rounding mode is
404
423
; unknown. The expansion should have only one conversion instruction.
405
424
; Verify that no gross errors happen.
You can’t perform that action at this time.
0 commit comments