diff options
Diffstat (limited to 'test/Transforms/InstCombine/add-sitofp.ll')
-rw-r--r-- | test/Transforms/InstCombine/add-sitofp.ll | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/test/Transforms/InstCombine/add-sitofp.ll b/test/Transforms/InstCombine/add-sitofp.ll index 3b5485e005284..2abfa436f6d33 100644 --- a/test/Transforms/InstCombine/add-sitofp.ll +++ b/test/Transforms/InstCombine/add-sitofp.ll @@ -1,6 +1,14 @@ -; RUN: opt < %s -instcombine -S | grep "add nuw nsw i32" +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py +; RUN: opt < %s -instcombine -S | FileCheck %s -define double @x(i32 %a, i32 %b) nounwind { +define double @x(i32 %a, i32 %b) { +; CHECK-LABEL: @x( +; CHECK-NEXT: [[M:%.*]] = lshr i32 [[A:%.*]], 24 +; CHECK-NEXT: [[N:%.*]] = and i32 [[M]], [[B:%.*]] +; CHECK-NEXT: [[ADDCONV:%.*]] = add nuw nsw i32 [[N]], 1 +; CHECK-NEXT: [[P:%.*]] = sitofp i32 [[ADDCONV]] to double +; CHECK-NEXT: ret double [[P]] +; %m = lshr i32 %a, 24 %n = and i32 %m, %b %o = sitofp i32 %n to double |