]> granicus.if.org Git - llvm/commitdiff
[NFC][Float2Int] Pre-commit unary FNeg test to basic.ll
authorCameron McInally <cameron.mcinally@nyu.edu>
Fri, 28 Jun 2019 15:12:15 +0000 (15:12 +0000)
committerCameron McInally <cameron.mcinally@nyu.edu>
Fri, 28 Jun 2019 15:12:15 +0000 (15:12 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364649 91177308-0d34-0410-b5e6-96231b3b80d8

test/Transforms/Float2Int/basic.ll

index 573714dbfb27a190856ee977b2af7e9d19dfe6d0..eb6c039f1cee5e084eae0346b477a935e9009492 100644 (file)
@@ -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.