@@ -575,5 +575,107 @@ define amdgpu_kernel void @rcp_ftzdaz() #1 {
575
575
ret void
576
576
}
577
577
578
+ define i32 @frem (i32 %arg ) {
579
+ ; CIFASTF64-LABEL: 'frem'
580
+ ; CIFASTF64-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %F32 = frem float undef, undef
581
+ ; CIFASTF64-NEXT: Cost Model: Found an estimated cost of 56 for instruction: %V4F32 = frem <4 x float> undef, undef
582
+ ; CIFASTF64-NEXT: Cost Model: Found an estimated cost of 112 for instruction: %V8F32 = frem <8 x float> undef, undef
583
+ ; CIFASTF64-NEXT: Cost Model: Found an estimated cost of 672 for instruction: %V16F32 = frem <16 x float> undef, undef
584
+ ; CIFASTF64-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %F64 = frem double undef, undef
585
+ ; CIFASTF64-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %V2F64 = frem <2 x double> undef, undef
586
+ ; CIFASTF64-NEXT: Cost Model: Found an estimated cost of 96 for instruction: %V4F64 = frem <4 x double> undef, undef
587
+ ; CIFASTF64-NEXT: Cost Model: Found an estimated cost of 576 for instruction: %V8F64 = frem <8 x double> undef, undef
588
+ ; CIFASTF64-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret i32 undef
589
+ ;
590
+ ; CISLOWF64-LABEL: 'frem'
591
+ ; CISLOWF64-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %F32 = frem float undef, undef
592
+ ; CISLOWF64-NEXT: Cost Model: Found an estimated cost of 56 for instruction: %V4F32 = frem <4 x float> undef, undef
593
+ ; CISLOWF64-NEXT: Cost Model: Found an estimated cost of 112 for instruction: %V8F32 = frem <8 x float> undef, undef
594
+ ; CISLOWF64-NEXT: Cost Model: Found an estimated cost of 672 for instruction: %V16F32 = frem <16 x float> undef, undef
595
+ ; CISLOWF64-NEXT: Cost Model: Found an estimated cost of 38 for instruction: %F64 = frem double undef, undef
596
+ ; CISLOWF64-NEXT: Cost Model: Found an estimated cost of 76 for instruction: %V2F64 = frem <2 x double> undef, undef
597
+ ; CISLOWF64-NEXT: Cost Model: Found an estimated cost of 152 for instruction: %V4F64 = frem <4 x double> undef, undef
598
+ ; CISLOWF64-NEXT: Cost Model: Found an estimated cost of 912 for instruction: %V8F64 = frem <8 x double> undef, undef
599
+ ; CISLOWF64-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret i32 undef
600
+ ;
601
+ ; SIFASTF64-LABEL: 'frem'
602
+ ; SIFASTF64-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %F32 = frem float undef, undef
603
+ ; SIFASTF64-NEXT: Cost Model: Found an estimated cost of 56 for instruction: %V4F32 = frem <4 x float> undef, undef
604
+ ; SIFASTF64-NEXT: Cost Model: Found an estimated cost of 112 for instruction: %V8F32 = frem <8 x float> undef, undef
605
+ ; SIFASTF64-NEXT: Cost Model: Found an estimated cost of 672 for instruction: %V16F32 = frem <16 x float> undef, undef
606
+ ; SIFASTF64-NEXT: Cost Model: Found an estimated cost of 27 for instruction: %F64 = frem double undef, undef
607
+ ; SIFASTF64-NEXT: Cost Model: Found an estimated cost of 54 for instruction: %V2F64 = frem <2 x double> undef, undef
608
+ ; SIFASTF64-NEXT: Cost Model: Found an estimated cost of 108 for instruction: %V4F64 = frem <4 x double> undef, undef
609
+ ; SIFASTF64-NEXT: Cost Model: Found an estimated cost of 648 for instruction: %V8F64 = frem <8 x double> undef, undef
610
+ ; SIFASTF64-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret i32 undef
611
+ ;
612
+ ; SISLOWF64-LABEL: 'frem'
613
+ ; SISLOWF64-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %F32 = frem float undef, undef
614
+ ; SISLOWF64-NEXT: Cost Model: Found an estimated cost of 56 for instruction: %V4F32 = frem <4 x float> undef, undef
615
+ ; SISLOWF64-NEXT: Cost Model: Found an estimated cost of 112 for instruction: %V8F32 = frem <8 x float> undef, undef
616
+ ; SISLOWF64-NEXT: Cost Model: Found an estimated cost of 672 for instruction: %V16F32 = frem <16 x float> undef, undef
617
+ ; SISLOWF64-NEXT: Cost Model: Found an estimated cost of 41 for instruction: %F64 = frem double undef, undef
618
+ ; SISLOWF64-NEXT: Cost Model: Found an estimated cost of 82 for instruction: %V2F64 = frem <2 x double> undef, undef
619
+ ; SISLOWF64-NEXT: Cost Model: Found an estimated cost of 164 for instruction: %V4F64 = frem <4 x double> undef, undef
620
+ ; SISLOWF64-NEXT: Cost Model: Found an estimated cost of 984 for instruction: %V8F64 = frem <8 x double> undef, undef
621
+ ; SISLOWF64-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret i32 undef
622
+ ;
623
+ ; FP16-LABEL: 'frem'
624
+ ; FP16-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %F32 = frem float undef, undef
625
+ ; FP16-NEXT: Cost Model: Found an estimated cost of 56 for instruction: %V4F32 = frem <4 x float> undef, undef
626
+ ; FP16-NEXT: Cost Model: Found an estimated cost of 112 for instruction: %V8F32 = frem <8 x float> undef, undef
627
+ ; FP16-NEXT: Cost Model: Found an estimated cost of 672 for instruction: %V16F32 = frem <16 x float> undef, undef
628
+ ; FP16-NEXT: Cost Model: Found an estimated cost of 38 for instruction: %F64 = frem double undef, undef
629
+ ; FP16-NEXT: Cost Model: Found an estimated cost of 76 for instruction: %V2F64 = frem <2 x double> undef, undef
630
+ ; FP16-NEXT: Cost Model: Found an estimated cost of 152 for instruction: %V4F64 = frem <4 x double> undef, undef
631
+ ; FP16-NEXT: Cost Model: Found an estimated cost of 912 for instruction: %V8F64 = frem <8 x double> undef, undef
632
+ ; FP16-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret i32 undef
633
+ ;
634
+ ; CI-SIZE-LABEL: 'frem'
635
+ ; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %F32 = frem float undef, undef
636
+ ; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %V4F32 = frem <4 x float> undef, undef
637
+ ; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 96 for instruction: %V8F32 = frem <8 x float> undef, undef
638
+ ; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 576 for instruction: %V16F32 = frem <16 x float> undef, undef
639
+ ; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %F64 = frem double undef, undef
640
+ ; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %V2F64 = frem <2 x double> undef, undef
641
+ ; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 88 for instruction: %V4F64 = frem <4 x double> undef, undef
642
+ ; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 528 for instruction: %V8F64 = frem <8 x double> undef, undef
643
+ ; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef
644
+ ;
645
+ ; SI-SIZE-LABEL: 'frem'
646
+ ; SI-SIZE-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %F32 = frem float undef, undef
647
+ ; SI-SIZE-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %V4F32 = frem <4 x float> undef, undef
648
+ ; SI-SIZE-NEXT: Cost Model: Found an estimated cost of 96 for instruction: %V8F32 = frem <8 x float> undef, undef
649
+ ; SI-SIZE-NEXT: Cost Model: Found an estimated cost of 576 for instruction: %V16F32 = frem <16 x float> undef, undef
650
+ ; SI-SIZE-NEXT: Cost Model: Found an estimated cost of 25 for instruction: %F64 = frem double undef, undef
651
+ ; SI-SIZE-NEXT: Cost Model: Found an estimated cost of 50 for instruction: %V2F64 = frem <2 x double> undef, undef
652
+ ; SI-SIZE-NEXT: Cost Model: Found an estimated cost of 100 for instruction: %V4F64 = frem <4 x double> undef, undef
653
+ ; SI-SIZE-NEXT: Cost Model: Found an estimated cost of 600 for instruction: %V8F64 = frem <8 x double> undef, undef
654
+ ; SI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef
655
+ ;
656
+ ; FP16-SIZE-LABEL: 'frem'
657
+ ; FP16-SIZE-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %F32 = frem float undef, undef
658
+ ; FP16-SIZE-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %V4F32 = frem <4 x float> undef, undef
659
+ ; FP16-SIZE-NEXT: Cost Model: Found an estimated cost of 96 for instruction: %V8F32 = frem <8 x float> undef, undef
660
+ ; FP16-SIZE-NEXT: Cost Model: Found an estimated cost of 576 for instruction: %V16F32 = frem <16 x float> undef, undef
661
+ ; FP16-SIZE-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %F64 = frem double undef, undef
662
+ ; FP16-SIZE-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %V2F64 = frem <2 x double> undef, undef
663
+ ; FP16-SIZE-NEXT: Cost Model: Found an estimated cost of 88 for instruction: %V4F64 = frem <4 x double> undef, undef
664
+ ; FP16-SIZE-NEXT: Cost Model: Found an estimated cost of 528 for instruction: %V8F64 = frem <8 x double> undef, undef
665
+ ; FP16-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef
666
+ ;
667
+ %F32 = frem float undef , undef
668
+ %V4F32 = frem <4 x float > undef , undef
669
+ %V8F32 = frem <8 x float > undef , undef
670
+ %V16F32 = frem <16 x float > undef , undef
671
+
672
+ %F64 = frem double undef , undef
673
+ %V2F64 = frem <2 x double > undef , undef
674
+ %V4F64 = frem <4 x double > undef , undef
675
+ %V8F64 = frem <8 x double > undef , undef
676
+
677
+ ret i32 undef
678
+ }
679
+
578
680
attributes #0 = { nounwind "denormal-fp-math-f32" ="ieee,ieee" }
579
681
attributes #1 = { nounwind "denormal-fp-math-f32" ="preserve-sign,preserve-sign" }
0 commit comments