diff options
Diffstat (limited to 'test/Transforms/InstCombine/add-sitofp.ll')
-rw-r--r-- | test/Transforms/InstCombine/add-sitofp.ll | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/add-sitofp.ll b/test/Transforms/InstCombine/add-sitofp.ll new file mode 100644 index 0000000..98a8cb4 --- /dev/null +++ b/test/Transforms/InstCombine/add-sitofp.ll @@ -0,0 +1,9 @@ +; RUN: opt < %s -instcombine -S | grep {add nsw i32} + +define double @x(i32 %a, i32 %b) nounwind { + %m = lshr i32 %a, 24 + %n = and i32 %m, %b + %o = sitofp i32 %n to double + %p = fadd double %o, 1.0 + ret double %p +} |