diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2011-03-06 03:36:19 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2011-03-06 03:36:19 +0000 |
commit | d01f50f42ce60207ed6d27fb1778e456d83be06c (patch) | |
tree | 6d7798f9ac99c0ec1b33f056715d3980fc92355f /test/Transforms/InstCombine/icmp.ll | |
parent | 511cab20cb6ef0575c961cbbcb86bb539b538a1c (diff) | |
download | llvm-d01f50f42ce60207ed6d27fb1778e456d83be06c.tar.gz llvm-d01f50f42ce60207ed6d27fb1778e456d83be06c.tar.bz2 llvm-d01f50f42ce60207ed6d27fb1778e456d83be06c.tar.xz |
ConstantInt has some getters which return ConstantInt's or ConstantVector's of
the value splatted into every element. Extend this to getTrue and getFalse which
by providing new overloads that take Types that are either i1 or <N x i1>. Use
it in InstCombine to add vector support to some code, fixing PR8469!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127116 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/InstCombine/icmp.ll')
-rw-r--r-- | test/Transforms/InstCombine/icmp.ll | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/icmp.ll b/test/Transforms/InstCombine/icmp.ll index 0230506697..63f76313f8 100644 --- a/test/Transforms/InstCombine/icmp.ll +++ b/test/Transforms/InstCombine/icmp.ll @@ -465,3 +465,13 @@ define i1 @test48(i32 %X, i32 %Y, i32 %Z) { %C = icmp eq i32 %A, %B ret i1 %C } + +; PR8469 +; CHECK: @test49 +; CHECK: ret <2 x i1> <i1 true, i1 true> +define <2 x i1> @test49(<2 x i32> %tmp3) { +entry: + %tmp11 = and <2 x i32> %tmp3, <i32 3, i32 3> + %cmp = icmp ult <2 x i32> %tmp11, <i32 4, i32 4> + ret <2 x i1> %cmp +} |