[llvm] r364649 - [NFC][Float2Int] Pre-commit unary FNeg test to basic.ll

Cameron McInally via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 28 08:12:15 PDT 2019


Author: mcinally
Date: Fri Jun 28 08:12:15 2019
New Revision: 364649

URL: http://llvm.org/viewvc/llvm-project?rev=364649&view=rev
Log:
[NFC][Float2Int] Pre-commit unary FNeg test to basic.ll

Modified:
    llvm/trunk/test/Transforms/Float2Int/basic.ll

Modified: llvm/trunk/test/Transforms/Float2Int/basic.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/Float2Int/basic.ll?rev=364649&r1=364648&r2=364649&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/Float2Int/basic.ll (original)
+++ llvm/trunk/test/Transforms/Float2Int/basic.ll Fri Jun 28 08:12:15 2019
@@ -79,6 +79,22 @@ define i32 @simple5(i8 %a, i8 %b) {
   ret i32 %5
 }
 
+; CHECK-LABEL: @simple6
+; CHECK:  %1 = uitofp i8 %a to float
+; CHECK:  %2 = uitofp i8 %b to float
+; CHECK:  %3 = fneg float %1
+; CHECK:  %4 = fmul float %3, %2
+; CHECK:  %5 = fptoui float %4 to i32
+; CHECK:  ret i32 %5
+define i32 @simple6(i8 %a, i8 %b) {
+  %1 = uitofp i8 %a to float
+  %2 = uitofp i8 %b to float
+  %3 = fneg float %1
+  %4 = fmul float %3, %2
+  %5 = fptoui float %4 to i32
+  ret i32 %5
+}
+
 ; The two chains don't interact - failure of one shouldn't
 ; cause failure of the other.
 




More information about the llvm-commits mailing list