diff options
| author | Sanjay Patel <spatel@rotateright.com> | 2016-08-30 17:31:34 +0000 |
|---|---|---|
| committer | Sanjay Patel <spatel@rotateright.com> | 2016-08-30 17:31:34 +0000 |
| commit | b37145712e2d1b318a302f5ecee1871b93c28164 (patch) | |
| tree | d5f1d2778a8a6004a174b5c7e4c1c4a058f2e5c5 /llvm/test | |
| parent | 84fc059e380816ac8becf25d6f0cc07b1bb60ce5 (diff) | |
| download | bcm5719-llvm-b37145712e2d1b318a302f5ecee1871b93c28164.tar.gz bcm5719-llvm-b37145712e2d1b318a302f5ecee1871b93c28164.zip | |
[InstCombine] replace divide-by-constant checks with asserts; NFC
These folds already have tests for scalar and vector types, except
for the vector div-by-0 case, so I'm adding tests for that.
llvm-svn: 280115
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/Transforms/InstSimplify/undef.ll | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/llvm/test/Transforms/InstSimplify/undef.ll b/llvm/test/Transforms/InstSimplify/undef.ll index b92184bb688..fd16ddc2f94 100644 --- a/llvm/test/Transforms/InstSimplify/undef.ll +++ b/llvm/test/Transforms/InstSimplify/undef.ll @@ -1,4 +1,3 @@ -; NOTE: Assertions have been autogenerated by update_test_checks.py ; RUN: opt -instsimplify -S < %s | FileCheck %s define i64 @test0() { @@ -194,6 +193,14 @@ define i32 @test20(i32 %a) { ret i32 %b } +define <2 x i32> @test20vec(<2 x i32> %a) { +; CHECK-LABEL: @test20vec( +; CHECK-NEXT: ret <2 x i32> undef +; + %b = udiv <2 x i32> %a, zeroinitializer + ret <2 x i32> %b +} + define i32 @test21(i32 %a) { ; CHECK-LABEL: @test21( ; CHECK: ret i32 undef @@ -202,6 +209,14 @@ define i32 @test21(i32 %a) { ret i32 %b } +define <2 x i32> @test21vec(<2 x i32> %a) { +; CHECK-LABEL: @test21vec( +; CHECK-NEXT: ret <2 x i32> undef +; + %b = sdiv <2 x i32> %a, zeroinitializer + ret <2 x i32> %b +} + define i32 @test22(i32 %a) { ; CHECK-LABEL: @test22( ; CHECK: ret i32 undef |

