[llvm] 6fb2a60 - [VectorCombine] Add test coverage for #115575

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 9 08:02:32 PST 2024


Author: Simon Pilgrim
Date: 2024-11-09T16:00:03Z
New Revision: 6fb2a6044f11e251c3847d227049d9dae8b87796

URL: https://github.com/llvm/llvm-project/commit/6fb2a6044f11e251c3847d227049d9dae8b87796
DIFF: https://github.com/llvm/llvm-project/commit/6fb2a6044f11e251c3847d227049d9dae8b87796.diff

LOG: [VectorCombine] Add test coverage for #115575

Added: 
    llvm/test/Transforms/VectorCombine/X86/pr115575.ll

Modified: 
    

Removed: 
    


################################################################################
diff  --git a/llvm/test/Transforms/VectorCombine/X86/pr115575.ll b/llvm/test/Transforms/VectorCombine/X86/pr115575.ll
new file mode 100644
index 00000000000000..8e8bb808324e12
--- /dev/null
+++ b/llvm/test/Transforms/VectorCombine/X86/pr115575.ll
@@ -0,0 +1,14 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4
+; RUN: opt < %s -passes=vector-combine -S -mtriple=x86_64-- | FileCheck %s
+
+define <2 x i8> @PR115575(i8 %x) {
+; CHECK-LABEL: define <2 x i8> @PR115575(
+; CHECK-SAME: i8 [[X:%.*]]) {
+; CHECK-NEXT:    [[BO_SCALAR:%.*]] = sdiv i8 [[X]], poison
+; CHECK-NEXT:    [[BO:%.*]] = insertelement <2 x i8> poison, i8 [[BO_SCALAR]], i64 3
+; CHECK-NEXT:    ret <2 x i8> [[BO]]
+;
+  %ins = insertelement <2 x i8> poison, i8 %x, i32 3
+  %bo = sdiv <2 x i8> %ins, <i8 5, i8 2>
+  ret <2 x i8> %bo
+}


        


More information about the llvm-commits mailing list