[llvm] r300438 - [InstCombine] Add test cases for missing support for simplifying 1/X for vectors. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 16 20:41:45 PDT 2017
Author: ctopper
Date: Sun Apr 16 22:41:44 2017
New Revision: 300438
URL: http://llvm.org/viewvc/llvm-project?rev=300438&view=rev
Log:
[InstCombine] Add test cases for missing support for simplifying 1/X for vectors. NFC
Modified:
llvm/trunk/test/Transforms/InstCombine/div.ll
Modified: llvm/trunk/test/Transforms/InstCombine/div.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/div.ll?rev=300438&r1=300437&r2=300438&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/div.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/div.ll Sun Apr 16 22:41:44 2017
@@ -225,6 +225,15 @@ define i32 @test19(i32 %x) {
ret i32 %A
}
+define <2 x i32> @test19vec(<2 x i32> %x) {
+; CHECK-LABEL: @test19vec(
+; CHECK-NEXT: [[A:%.*]] = udiv <2 x i32> <i32 1, i32 1>, [[X:%.*]]
+; CHECK-NEXT: ret <2 x i32> [[A]]
+;
+ %A = udiv <2 x i32> <i32 1, i32 1>, %x
+ ret <2 x i32> %A
+}
+
define i32 @test20(i32 %x) {
; CHECK-LABEL: @test20(
; CHECK-NEXT: [[TMP1:%.*]] = add i32 %x, 1
@@ -236,6 +245,15 @@ define i32 @test20(i32 %x) {
ret i32 %A
}
+define <2 x i32> @test20vec(<2 x i32> %x) {
+; CHECK-LABEL: @test20vec(
+; CHECK-NEXT: [[A:%.*]] = sdiv <2 x i32> <i32 1, i32 1>, [[X:%.*]]
+; CHECK-NEXT: ret <2 x i32> [[A]]
+;
+ %A = sdiv <2 x i32> <i32 1, i32 1>, %x
+ ret <2 x i32> %A
+}
+
define i32 @test21(i32 %a) {
; CHECK-LABEL: @test21(
; CHECK-NEXT: [[DIV:%.*]] = sdiv i32 %a, 3
More information about the llvm-commits
mailing list