diff options
| author | Sanjay Patel <spatel@rotateright.com> | 2016-08-15 20:02:40 +0000 |
|---|---|---|
| committer | Sanjay Patel <spatel@rotateright.com> | 2016-08-15 20:02:40 +0000 |
| commit | b37bd6d7b7900f4f70f09630a9e52bcdff36f3cb (patch) | |
| tree | cd04d8513de4184b3eaaf44319b26696bd87729b | |
| parent | 7d98be81cc88c633cd932bcb543bc49e50cc47a9 (diff) | |
| download | bcm5719-llvm-b37bd6d7b7900f4f70f09630a9e52bcdff36f3cb.tar.gz bcm5719-llvm-b37bd6d7b7900f4f70f09630a9e52bcdff36f3cb.zip | |
[InstCombine] add test for missing vector icmp fold
llvm-svn: 278727
| -rw-r--r-- | llvm/test/Transforms/InstCombine/icmp.ll | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstCombine/icmp.ll b/llvm/test/Transforms/InstCombine/icmp.ll index 1b2f8efa632..1aa37142c23 100644 --- a/llvm/test/Transforms/InstCombine/icmp.ll +++ b/llvm/test/Transforms/InstCombine/icmp.ll @@ -282,6 +282,18 @@ define i1 @test23(i32 %x) { ret i1 %i4 } +; FIXME: Vectors should fold too. +define <2 x i1> @test23vec(<2 x i32> %x) { +; CHECK-LABEL: @test23vec( +; CHECK-NEXT: [[I3:%.*]] = sdiv <2 x i32> %x, <i32 -1328634635, i32 -1328634635> +; CHECK-NEXT: [[I4:%.*]] = icmp eq <2 x i32> [[I3]], <i32 -1, i32 -1> +; CHECK-NEXT: ret <2 x i1> [[I4]] +; + %i3 = sdiv <2 x i32> %x, <i32 -1328634635, i32 -1328634635> + %i4 = icmp eq <2 x i32> %i3, <i32 -1, i32 -1> + ret <2 x i1> %i4 +} + @X = global [1000 x i32] zeroinitializer ; PR8882 |

