diff options
| author | Sanjay Patel <spatel@rotateright.com> | 2017-01-06 19:14:05 +0000 |
|---|---|---|
| committer | Sanjay Patel <spatel@rotateright.com> | 2017-01-06 19:14:05 +0000 |
| commit | 2715d92389e971fc836634db42e7afeb5280099a (patch) | |
| tree | 75e998f4288f6e53ab600bb0bfe69ccbae515572 /llvm | |
| parent | 35cfca2e20c67e167060b5f00d352f64eda47b38 (diff) | |
| download | bcm5719-llvm-2715d92389e971fc836634db42e7afeb5280099a.tar.gz bcm5719-llvm-2715d92389e971fc836634db42e7afeb5280099a.zip | |
[InstCombine] add a vector version of a test added in r291262; NFC
llvm-svn: 291265
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/test/Transforms/InstCombine/icmp-shl-nsw.ll | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstCombine/icmp-shl-nsw.ll b/llvm/test/Transforms/InstCombine/icmp-shl-nsw.ll index 85e397ec241..896a45625b9 100644 --- a/llvm/test/Transforms/InstCombine/icmp-shl-nsw.ll +++ b/llvm/test/Transforms/InstCombine/icmp-shl-nsw.ll @@ -201,5 +201,18 @@ define i1 @icmp_sgt11(i8 %x) { ret i1 %cmp } +; Splat vector version should fold the same way. + +define <2 x i1> @icmp_sgt11_vec(<2 x i8> %x) { +; CHECK-LABEL: @icmp_sgt11_vec( +; CHECK-NEXT: [[SHL:%.*]] = shl nsw <2 x i8> %x, <i8 7, i8 7> +; CHECK-NEXT: [[CMP:%.*]] = icmp sgt <2 x i8> [[SHL]], <i8 -2, i8 -2> +; CHECK-NEXT: ret <2 x i1> [[CMP]] +; + %shl = shl nsw <2 x i8> %x, <i8 7, i8 7> + %cmp = icmp sgt <2 x i8> %shl, <i8 -2, i8 -2> + ret <2 x i1> %cmp +} + ; Known bits analysis returns false for compares with >=0. |

