summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/Float2Int
diff options
context:
space:
mode:
authorCameron McInally <cameron.mcinally@nyu.edu>2019-06-28 15:12:15 +0000
committerCameron McInally <cameron.mcinally@nyu.edu>2019-06-28 15:12:15 +0000
commit9fab46ca0bd38babf7b1a441d44389dcb66a1935 (patch)
tree759333cc807cf57bbe0cde03dbd781e80402a90e /llvm/test/Transforms/Float2Int
parent40b88e07e2dd40c6a98265b98696408cc1b39889 (diff)
downloadbcm5719-llvm-9fab46ca0bd38babf7b1a441d44389dcb66a1935.tar.gz
bcm5719-llvm-9fab46ca0bd38babf7b1a441d44389dcb66a1935.zip
[NFC][Float2Int] Pre-commit unary FNeg test to basic.ll
llvm-svn: 364649
Diffstat (limited to 'llvm/test/Transforms/Float2Int')
-rw-r--r--llvm/test/Transforms/Float2Int/basic.ll16
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/test/Transforms/Float2Int/basic.ll b/llvm/test/Transforms/Float2Int/basic.ll
index 573714dbfb2..eb6c039f1ce 100644
--- a/llvm/test/Transforms/Float2Int/basic.ll
+++ b/llvm/test/Transforms/Float2Int/basic.ll
@@ -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.
OpenPOWER on IntegriCloud