From 1ee9014449adece2d817cd5f03d570ea3fe0af41 Mon Sep 17 00:00:00 2001 From: Icohedron Date: Tue, 11 Feb 2025 22:45:26 +0000 Subject: [PATCH 1/5] Make uadd_with_overflow scalarizable --- llvm/lib/Analysis/VectorUtils.cpp | 1 + llvm/test/Transforms/Scalarizer/uadd_overflow.ll | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/llvm/lib/Analysis/VectorUtils.cpp b/llvm/lib/Analysis/VectorUtils.cpp index ad80e458ab57d..97b29cfc3c737 100644 --- a/llvm/lib/Analysis/VectorUtils.cpp +++ b/llvm/lib/Analysis/VectorUtils.cpp @@ -125,6 +125,7 @@ bool llvm::isTriviallyScalarizable(Intrinsic::ID ID, // https://github.com/llvm/llvm-project/issues/112408 switch (ID) { case Intrinsic::frexp: + case Intrinsic::uadd_with_overflow: return true; } return false; diff --git a/llvm/test/Transforms/Scalarizer/uadd_overflow.ll b/llvm/test/Transforms/Scalarizer/uadd_overflow.ll index 39094451523a5..f266e5f08b3f6 100644 --- a/llvm/test/Transforms/Scalarizer/uadd_overflow.ll +++ b/llvm/test/Transforms/Scalarizer/uadd_overflow.ll @@ -1,13 +1,21 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 ; RUN: opt %s -passes='function(scalarizer)' -S | FileCheck %s -; Test to make sure that struct return intrinsics that are not `isTriviallyScalarizable` do not get scalarized. - define <3 x i32> @test_(<3 x i32> %a, <3 x i32> %b) { ; CHECK-LABEL: define <3 x i32> @test_( ; CHECK-SAME: <3 x i32> [[A:%.*]], <3 x i32> [[B:%.*]]) { -; CHECK-NEXT: [[R:%.*]] = call { <3 x i32>, <3 x i1> } @llvm.uadd.with.overflow.v3i32(<3 x i32> [[B]], <3 x i32> [[B]]) -; CHECK-NEXT: [[EL:%.*]] = extractvalue { <3 x i32>, <3 x i1> } [[R]], 0 +; CHECK-NEXT: [[B_I0:%.*]] = extractelement <3 x i32> [[B]], i64 0 +; CHECK-NEXT: [[R_I0:%.*]] = call { i32, i1 } @llvm.uadd.with.overflow.i32(i32 [[B_I0]], i32 [[B_I0]]) +; CHECK-NEXT: [[B_I1:%.*]] = extractelement <3 x i32> [[B]], i64 1 +; CHECK-NEXT: [[R_I1:%.*]] = call { i32, i1 } @llvm.uadd.with.overflow.i32(i32 [[B_I1]], i32 [[B_I1]]) +; CHECK-NEXT: [[B_I2:%.*]] = extractelement <3 x i32> [[B]], i64 2 +; CHECK-NEXT: [[R_I2:%.*]] = call { i32, i1 } @llvm.uadd.with.overflow.i32(i32 [[B_I2]], i32 [[B_I2]]) +; CHECK-NEXT: [[EL_ELEM0:%.*]] = extractvalue { i32, i1 } [[R_I0]], 0 +; CHECK-NEXT: [[EL_ELEM01:%.*]] = extractvalue { i32, i1 } [[R_I1]], 0 +; CHECK-NEXT: [[EL_ELEM02:%.*]] = extractvalue { i32, i1 } [[R_I2]], 0 +; CHECK-NEXT: [[EL_UPTO0:%.*]] = insertelement <3 x i32> poison, i32 [[EL_ELEM0]], i64 0 +; CHECK-NEXT: [[EL_UPTO1:%.*]] = insertelement <3 x i32> [[EL_UPTO0]], i32 [[EL_ELEM01]], i64 1 +; CHECK-NEXT: [[EL:%.*]] = insertelement <3 x i32> [[EL_UPTO1]], i32 [[EL_ELEM02]], i64 2 ; CHECK-NEXT: ret <3 x i32> [[EL]] ; %r = call { <3 x i32>, <3 x i1> } @llvm.uadd.with.overflow.v3i32(<3 x i32> %b, <3 x i32> %b) From e91e4c61aba7ce55169368aab1b66bfcbaf196c3 Mon Sep 17 00:00:00 2001 From: Icohedron Date: Tue, 11 Feb 2025 23:15:43 +0000 Subject: [PATCH 2/5] Add a test for an intrinsic that is not marked as isTriviallyScalarizable Since uadd_with_overflow is now marked isTriviallyScalarizable, another intrinsic needs to take its place for testing the bug fix introduced in #113625 for issue #113624. --- llvm/test/Transforms/Scalarizer/sincos.ll | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 llvm/test/Transforms/Scalarizer/sincos.ll diff --git a/llvm/test/Transforms/Scalarizer/sincos.ll b/llvm/test/Transforms/Scalarizer/sincos.ll new file mode 100644 index 0000000000000..6510cbc33ccb7 --- /dev/null +++ b/llvm/test/Transforms/Scalarizer/sincos.ll @@ -0,0 +1,17 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 +; RUN: opt %s -passes='function(scalarizer)' -S | FileCheck %s + +; Test to make sure that struct return intrinsics that are not `isTriviallyScalarizable` do not get scalarized. + +define <4 x float> @test_(<4 x float> %Val) { +; CHECK-LABEL: define <4 x float> @test_( +; CHECK-SAME: <4 x float> [[VAL:%.*]]) { +; CHECK-NEXT: [[R:%.*]] = call { <4 x float>, <4 x float> } @llvm.sincos.v4f32(<4 x float> [[VAL]]) +; CHECK-NEXT: [[EL:%.*]] = extractvalue { <4 x float>, <4 x float> } [[R]], 0 +; CHECK-NEXT: ret <4 x float> [[EL]] +; + %r = call { <4 x float>, <4 x float> } @llvm.sincos.v4f32(<4 x float> %Val) + %el = extractvalue { <4 x float>, <4 x float> } %r, 0 + ret <4 x float> %el +} + From b2a128bc7c7b8aee1bdb1f70af0d007c8439dc4a Mon Sep 17 00:00:00 2001 From: Icohedron Date: Wed, 12 Feb 2025 18:02:11 +0000 Subject: [PATCH 3/5] Make sadd, smul, ssub, umul, and usub trivially scalarizable --- llvm/lib/Analysis/VectorUtils.cpp | 6 +++++ .../Scalarizer/sadd_with_overflow.ll | 24 +++++++++++++++++++ .../Scalarizer/smul_with_overflow.ll | 24 +++++++++++++++++++ .../Scalarizer/ssub_with_overflow.ll | 24 +++++++++++++++++++ ...uadd_overflow.ll => uadd_with_overflow.ll} | 0 .../Scalarizer/umul_with_overflow.ll | 24 +++++++++++++++++++ .../Scalarizer/usub_with_overflow.ll | 24 +++++++++++++++++++ 7 files changed, 126 insertions(+) create mode 100644 llvm/test/Transforms/Scalarizer/sadd_with_overflow.ll create mode 100644 llvm/test/Transforms/Scalarizer/smul_with_overflow.ll create mode 100644 llvm/test/Transforms/Scalarizer/ssub_with_overflow.ll rename llvm/test/Transforms/Scalarizer/{uadd_overflow.ll => uadd_with_overflow.ll} (100%) create mode 100644 llvm/test/Transforms/Scalarizer/umul_with_overflow.ll create mode 100644 llvm/test/Transforms/Scalarizer/usub_with_overflow.ll diff --git a/llvm/lib/Analysis/VectorUtils.cpp b/llvm/lib/Analysis/VectorUtils.cpp index 97b29cfc3c737..b6671422e574d 100644 --- a/llvm/lib/Analysis/VectorUtils.cpp +++ b/llvm/lib/Analysis/VectorUtils.cpp @@ -23,6 +23,7 @@ #include "llvm/IR/Constants.h" #include "llvm/IR/DerivedTypes.h" #include "llvm/IR/IRBuilder.h" +#include "llvm/IR/Intrinsics.h" #include "llvm/IR/MemoryModelRelaxationAnnotations.h" #include "llvm/IR/PatternMatch.h" #include "llvm/IR/Value.h" @@ -126,6 +127,11 @@ bool llvm::isTriviallyScalarizable(Intrinsic::ID ID, switch (ID) { case Intrinsic::frexp: case Intrinsic::uadd_with_overflow: + case Intrinsic::sadd_with_overflow: + case Intrinsic::ssub_with_overflow: + case Intrinsic::usub_with_overflow: + case Intrinsic::umul_with_overflow: + case Intrinsic::smul_with_overflow: return true; } return false; diff --git a/llvm/test/Transforms/Scalarizer/sadd_with_overflow.ll b/llvm/test/Transforms/Scalarizer/sadd_with_overflow.ll new file mode 100644 index 0000000000000..5ab54aaefb0e8 --- /dev/null +++ b/llvm/test/Transforms/Scalarizer/sadd_with_overflow.ll @@ -0,0 +1,24 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 +; RUN: opt %s -passes='function(scalarizer)' -S | FileCheck %s + +define <3 x i32> @test_(<3 x i32> %a, <3 x i32> %b) { +; CHECK-LABEL: define <3 x i32> @test_( +; CHECK-SAME: <3 x i32> [[A:%.*]], <3 x i32> [[B:%.*]]) { +; CHECK-NEXT: [[B_I0:%.*]] = extractelement <3 x i32> [[B]], i64 0 +; CHECK-NEXT: [[R_I0:%.*]] = call { i32, i1 } @llvm.sadd.with.overflow.i32(i32 [[B_I0]], i32 [[B_I0]]) +; CHECK-NEXT: [[B_I1:%.*]] = extractelement <3 x i32> [[B]], i64 1 +; CHECK-NEXT: [[R_I1:%.*]] = call { i32, i1 } @llvm.sadd.with.overflow.i32(i32 [[B_I1]], i32 [[B_I1]]) +; CHECK-NEXT: [[B_I2:%.*]] = extractelement <3 x i32> [[B]], i64 2 +; CHECK-NEXT: [[R_I2:%.*]] = call { i32, i1 } @llvm.sadd.with.overflow.i32(i32 [[B_I2]], i32 [[B_I2]]) +; CHECK-NEXT: [[EL_ELEM0:%.*]] = extractvalue { i32, i1 } [[R_I0]], 0 +; CHECK-NEXT: [[EL_ELEM01:%.*]] = extractvalue { i32, i1 } [[R_I1]], 0 +; CHECK-NEXT: [[EL_ELEM02:%.*]] = extractvalue { i32, i1 } [[R_I2]], 0 +; CHECK-NEXT: [[EL_UPTO0:%.*]] = insertelement <3 x i32> poison, i32 [[EL_ELEM0]], i64 0 +; CHECK-NEXT: [[EL_UPTO1:%.*]] = insertelement <3 x i32> [[EL_UPTO0]], i32 [[EL_ELEM01]], i64 1 +; CHECK-NEXT: [[EL:%.*]] = insertelement <3 x i32> [[EL_UPTO1]], i32 [[EL_ELEM02]], i64 2 +; CHECK-NEXT: ret <3 x i32> [[EL]] +; + %r = call { <3 x i32>, <3 x i1> } @llvm.sadd.with.overflow.v3i32(<3 x i32> %b, <3 x i32> %b) + %el = extractvalue { <3 x i32>, <3 x i1> } %r, 0 + ret <3 x i32> %el +} diff --git a/llvm/test/Transforms/Scalarizer/smul_with_overflow.ll b/llvm/test/Transforms/Scalarizer/smul_with_overflow.ll new file mode 100644 index 0000000000000..5a1ba113c4eec --- /dev/null +++ b/llvm/test/Transforms/Scalarizer/smul_with_overflow.ll @@ -0,0 +1,24 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 +; RUN: opt %s -passes='function(scalarizer)' -S | FileCheck %s + +define <3 x i32> @test_(<3 x i32> %a, <3 x i32> %b) { +; CHECK-LABEL: define <3 x i32> @test_( +; CHECK-SAME: <3 x i32> [[A:%.*]], <3 x i32> [[B:%.*]]) { +; CHECK-NEXT: [[B_I0:%.*]] = extractelement <3 x i32> [[B]], i64 0 +; CHECK-NEXT: [[R_I0:%.*]] = call { i32, i1 } @llvm.smul.with.overflow.i32(i32 [[B_I0]], i32 [[B_I0]]) +; CHECK-NEXT: [[B_I1:%.*]] = extractelement <3 x i32> [[B]], i64 1 +; CHECK-NEXT: [[R_I1:%.*]] = call { i32, i1 } @llvm.smul.with.overflow.i32(i32 [[B_I1]], i32 [[B_I1]]) +; CHECK-NEXT: [[B_I2:%.*]] = extractelement <3 x i32> [[B]], i64 2 +; CHECK-NEXT: [[R_I2:%.*]] = call { i32, i1 } @llvm.smul.with.overflow.i32(i32 [[B_I2]], i32 [[B_I2]]) +; CHECK-NEXT: [[EL_ELEM0:%.*]] = extractvalue { i32, i1 } [[R_I0]], 0 +; CHECK-NEXT: [[EL_ELEM01:%.*]] = extractvalue { i32, i1 } [[R_I1]], 0 +; CHECK-NEXT: [[EL_ELEM02:%.*]] = extractvalue { i32, i1 } [[R_I2]], 0 +; CHECK-NEXT: [[EL_UPTO0:%.*]] = insertelement <3 x i32> poison, i32 [[EL_ELEM0]], i64 0 +; CHECK-NEXT: [[EL_UPTO1:%.*]] = insertelement <3 x i32> [[EL_UPTO0]], i32 [[EL_ELEM01]], i64 1 +; CHECK-NEXT: [[EL:%.*]] = insertelement <3 x i32> [[EL_UPTO1]], i32 [[EL_ELEM02]], i64 2 +; CHECK-NEXT: ret <3 x i32> [[EL]] +; + %r = call { <3 x i32>, <3 x i1> } @llvm.smul.with.overflow.v3i32(<3 x i32> %b, <3 x i32> %b) + %el = extractvalue { <3 x i32>, <3 x i1> } %r, 0 + ret <3 x i32> %el +} diff --git a/llvm/test/Transforms/Scalarizer/ssub_with_overflow.ll b/llvm/test/Transforms/Scalarizer/ssub_with_overflow.ll new file mode 100644 index 0000000000000..355d757dccbe9 --- /dev/null +++ b/llvm/test/Transforms/Scalarizer/ssub_with_overflow.ll @@ -0,0 +1,24 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 +; RUN: opt %s -passes='function(scalarizer)' -S | FileCheck %s + +define <3 x i32> @test_(<3 x i32> %a, <3 x i32> %b) { +; CHECK-LABEL: define <3 x i32> @test_( +; CHECK-SAME: <3 x i32> [[A:%.*]], <3 x i32> [[B:%.*]]) { +; CHECK-NEXT: [[B_I0:%.*]] = extractelement <3 x i32> [[B]], i64 0 +; CHECK-NEXT: [[R_I0:%.*]] = call { i32, i1 } @llvm.ssub.with.overflow.i32(i32 [[B_I0]], i32 [[B_I0]]) +; CHECK-NEXT: [[B_I1:%.*]] = extractelement <3 x i32> [[B]], i64 1 +; CHECK-NEXT: [[R_I1:%.*]] = call { i32, i1 } @llvm.ssub.with.overflow.i32(i32 [[B_I1]], i32 [[B_I1]]) +; CHECK-NEXT: [[B_I2:%.*]] = extractelement <3 x i32> [[B]], i64 2 +; CHECK-NEXT: [[R_I2:%.*]] = call { i32, i1 } @llvm.ssub.with.overflow.i32(i32 [[B_I2]], i32 [[B_I2]]) +; CHECK-NEXT: [[EL_ELEM0:%.*]] = extractvalue { i32, i1 } [[R_I0]], 0 +; CHECK-NEXT: [[EL_ELEM01:%.*]] = extractvalue { i32, i1 } [[R_I1]], 0 +; CHECK-NEXT: [[EL_ELEM02:%.*]] = extractvalue { i32, i1 } [[R_I2]], 0 +; CHECK-NEXT: [[EL_UPTO0:%.*]] = insertelement <3 x i32> poison, i32 [[EL_ELEM0]], i64 0 +; CHECK-NEXT: [[EL_UPTO1:%.*]] = insertelement <3 x i32> [[EL_UPTO0]], i32 [[EL_ELEM01]], i64 1 +; CHECK-NEXT: [[EL:%.*]] = insertelement <3 x i32> [[EL_UPTO1]], i32 [[EL_ELEM02]], i64 2 +; CHECK-NEXT: ret <3 x i32> [[EL]] +; + %r = call { <3 x i32>, <3 x i1> } @llvm.ssub.with.overflow.v3i32(<3 x i32> %b, <3 x i32> %b) + %el = extractvalue { <3 x i32>, <3 x i1> } %r, 0 + ret <3 x i32> %el +} diff --git a/llvm/test/Transforms/Scalarizer/uadd_overflow.ll b/llvm/test/Transforms/Scalarizer/uadd_with_overflow.ll similarity index 100% rename from llvm/test/Transforms/Scalarizer/uadd_overflow.ll rename to llvm/test/Transforms/Scalarizer/uadd_with_overflow.ll diff --git a/llvm/test/Transforms/Scalarizer/umul_with_overflow.ll b/llvm/test/Transforms/Scalarizer/umul_with_overflow.ll new file mode 100644 index 0000000000000..30f0485644b16 --- /dev/null +++ b/llvm/test/Transforms/Scalarizer/umul_with_overflow.ll @@ -0,0 +1,24 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 +; RUN: opt %s -passes='function(scalarizer)' -S | FileCheck %s + +define <3 x i32> @test_(<3 x i32> %a, <3 x i32> %b) { +; CHECK-LABEL: define <3 x i32> @test_( +; CHECK-SAME: <3 x i32> [[A:%.*]], <3 x i32> [[B:%.*]]) { +; CHECK-NEXT: [[B_I0:%.*]] = extractelement <3 x i32> [[B]], i64 0 +; CHECK-NEXT: [[R_I0:%.*]] = call { i32, i1 } @llvm.umul.with.overflow.i32(i32 [[B_I0]], i32 [[B_I0]]) +; CHECK-NEXT: [[B_I1:%.*]] = extractelement <3 x i32> [[B]], i64 1 +; CHECK-NEXT: [[R_I1:%.*]] = call { i32, i1 } @llvm.umul.with.overflow.i32(i32 [[B_I1]], i32 [[B_I1]]) +; CHECK-NEXT: [[B_I2:%.*]] = extractelement <3 x i32> [[B]], i64 2 +; CHECK-NEXT: [[R_I2:%.*]] = call { i32, i1 } @llvm.umul.with.overflow.i32(i32 [[B_I2]], i32 [[B_I2]]) +; CHECK-NEXT: [[EL_ELEM0:%.*]] = extractvalue { i32, i1 } [[R_I0]], 0 +; CHECK-NEXT: [[EL_ELEM01:%.*]] = extractvalue { i32, i1 } [[R_I1]], 0 +; CHECK-NEXT: [[EL_ELEM02:%.*]] = extractvalue { i32, i1 } [[R_I2]], 0 +; CHECK-NEXT: [[EL_UPTO0:%.*]] = insertelement <3 x i32> poison, i32 [[EL_ELEM0]], i64 0 +; CHECK-NEXT: [[EL_UPTO1:%.*]] = insertelement <3 x i32> [[EL_UPTO0]], i32 [[EL_ELEM01]], i64 1 +; CHECK-NEXT: [[EL:%.*]] = insertelement <3 x i32> [[EL_UPTO1]], i32 [[EL_ELEM02]], i64 2 +; CHECK-NEXT: ret <3 x i32> [[EL]] +; + %r = call { <3 x i32>, <3 x i1> } @llvm.umul.with.overflow.v3i32(<3 x i32> %b, <3 x i32> %b) + %el = extractvalue { <3 x i32>, <3 x i1> } %r, 0 + ret <3 x i32> %el +} diff --git a/llvm/test/Transforms/Scalarizer/usub_with_overflow.ll b/llvm/test/Transforms/Scalarizer/usub_with_overflow.ll new file mode 100644 index 0000000000000..782903bb760d8 --- /dev/null +++ b/llvm/test/Transforms/Scalarizer/usub_with_overflow.ll @@ -0,0 +1,24 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 +; RUN: opt %s -passes='function(scalarizer)' -S | FileCheck %s + +define <3 x i32> @test_(<3 x i32> %a, <3 x i32> %b) { +; CHECK-LABEL: define <3 x i32> @test_( +; CHECK-SAME: <3 x i32> [[A:%.*]], <3 x i32> [[B:%.*]]) { +; CHECK-NEXT: [[B_I0:%.*]] = extractelement <3 x i32> [[B]], i64 0 +; CHECK-NEXT: [[R_I0:%.*]] = call { i32, i1 } @llvm.usub.with.overflow.i32(i32 [[B_I0]], i32 [[B_I0]]) +; CHECK-NEXT: [[B_I1:%.*]] = extractelement <3 x i32> [[B]], i64 1 +; CHECK-NEXT: [[R_I1:%.*]] = call { i32, i1 } @llvm.usub.with.overflow.i32(i32 [[B_I1]], i32 [[B_I1]]) +; CHECK-NEXT: [[B_I2:%.*]] = extractelement <3 x i32> [[B]], i64 2 +; CHECK-NEXT: [[R_I2:%.*]] = call { i32, i1 } @llvm.usub.with.overflow.i32(i32 [[B_I2]], i32 [[B_I2]]) +; CHECK-NEXT: [[EL_ELEM0:%.*]] = extractvalue { i32, i1 } [[R_I0]], 0 +; CHECK-NEXT: [[EL_ELEM01:%.*]] = extractvalue { i32, i1 } [[R_I1]], 0 +; CHECK-NEXT: [[EL_ELEM02:%.*]] = extractvalue { i32, i1 } [[R_I2]], 0 +; CHECK-NEXT: [[EL_UPTO0:%.*]] = insertelement <3 x i32> poison, i32 [[EL_ELEM0]], i64 0 +; CHECK-NEXT: [[EL_UPTO1:%.*]] = insertelement <3 x i32> [[EL_UPTO0]], i32 [[EL_ELEM01]], i64 1 +; CHECK-NEXT: [[EL:%.*]] = insertelement <3 x i32> [[EL_UPTO1]], i32 [[EL_ELEM02]], i64 2 +; CHECK-NEXT: ret <3 x i32> [[EL]] +; + %r = call { <3 x i32>, <3 x i1> } @llvm.usub.with.overflow.v3i32(<3 x i32> %b, <3 x i32> %b) + %el = extractvalue { <3 x i32>, <3 x i1> } %r, 0 + ret <3 x i32> %el +} From 0ecf77e2413928a70e5c8b20b69d73388a1a9a22 Mon Sep 17 00:00:00 2001 From: Icohedron Date: Wed, 12 Feb 2025 19:09:30 +0000 Subject: [PATCH 4/5] Remove unnecessary include from VectorUtils.cpp --- llvm/lib/Analysis/VectorUtils.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/llvm/lib/Analysis/VectorUtils.cpp b/llvm/lib/Analysis/VectorUtils.cpp index b6671422e574d..53be7fc0bee9f 100644 --- a/llvm/lib/Analysis/VectorUtils.cpp +++ b/llvm/lib/Analysis/VectorUtils.cpp @@ -23,7 +23,6 @@ #include "llvm/IR/Constants.h" #include "llvm/IR/DerivedTypes.h" #include "llvm/IR/IRBuilder.h" -#include "llvm/IR/Intrinsics.h" #include "llvm/IR/MemoryModelRelaxationAnnotations.h" #include "llvm/IR/PatternMatch.h" #include "llvm/IR/Value.h" From 0d6eb29fce69aeb5053540af0d3c54f3951f6978 Mon Sep 17 00:00:00 2001 From: Icohedron Date: Thu, 13 Feb 2025 17:14:08 +0000 Subject: [PATCH 5/5] Replace single quotes with double quotes so the update_test_checks.py script run on Windows --- llvm/test/Transforms/Scalarizer/sadd_with_overflow.ll | 2 +- llvm/test/Transforms/Scalarizer/sincos.ll | 2 +- llvm/test/Transforms/Scalarizer/smul_with_overflow.ll | 2 +- llvm/test/Transforms/Scalarizer/ssub_with_overflow.ll | 2 +- llvm/test/Transforms/Scalarizer/uadd_with_overflow.ll | 2 +- llvm/test/Transforms/Scalarizer/umul_with_overflow.ll | 2 +- llvm/test/Transforms/Scalarizer/usub_with_overflow.ll | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/llvm/test/Transforms/Scalarizer/sadd_with_overflow.ll b/llvm/test/Transforms/Scalarizer/sadd_with_overflow.ll index 5ab54aaefb0e8..1e5c50358bb4a 100644 --- a/llvm/test/Transforms/Scalarizer/sadd_with_overflow.ll +++ b/llvm/test/Transforms/Scalarizer/sadd_with_overflow.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 -; RUN: opt %s -passes='function(scalarizer)' -S | FileCheck %s +; RUN: opt %s -passes="function(scalarizer)" -S | FileCheck %s define <3 x i32> @test_(<3 x i32> %a, <3 x i32> %b) { ; CHECK-LABEL: define <3 x i32> @test_( diff --git a/llvm/test/Transforms/Scalarizer/sincos.ll b/llvm/test/Transforms/Scalarizer/sincos.ll index 6510cbc33ccb7..8db4ba3183290 100644 --- a/llvm/test/Transforms/Scalarizer/sincos.ll +++ b/llvm/test/Transforms/Scalarizer/sincos.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 -; RUN: opt %s -passes='function(scalarizer)' -S | FileCheck %s +; RUN: opt %s -passes="function(scalarizer)" -S | FileCheck %s ; Test to make sure that struct return intrinsics that are not `isTriviallyScalarizable` do not get scalarized. diff --git a/llvm/test/Transforms/Scalarizer/smul_with_overflow.ll b/llvm/test/Transforms/Scalarizer/smul_with_overflow.ll index 5a1ba113c4eec..c934077b24f30 100644 --- a/llvm/test/Transforms/Scalarizer/smul_with_overflow.ll +++ b/llvm/test/Transforms/Scalarizer/smul_with_overflow.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 -; RUN: opt %s -passes='function(scalarizer)' -S | FileCheck %s +; RUN: opt %s -passes="function(scalarizer)" -S | FileCheck %s define <3 x i32> @test_(<3 x i32> %a, <3 x i32> %b) { ; CHECK-LABEL: define <3 x i32> @test_( diff --git a/llvm/test/Transforms/Scalarizer/ssub_with_overflow.ll b/llvm/test/Transforms/Scalarizer/ssub_with_overflow.ll index 355d757dccbe9..3654e20b51599 100644 --- a/llvm/test/Transforms/Scalarizer/ssub_with_overflow.ll +++ b/llvm/test/Transforms/Scalarizer/ssub_with_overflow.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 -; RUN: opt %s -passes='function(scalarizer)' -S | FileCheck %s +; RUN: opt %s -passes="function(scalarizer)" -S | FileCheck %s define <3 x i32> @test_(<3 x i32> %a, <3 x i32> %b) { ; CHECK-LABEL: define <3 x i32> @test_( diff --git a/llvm/test/Transforms/Scalarizer/uadd_with_overflow.ll b/llvm/test/Transforms/Scalarizer/uadd_with_overflow.ll index f266e5f08b3f6..1c4b6124b00bb 100644 --- a/llvm/test/Transforms/Scalarizer/uadd_with_overflow.ll +++ b/llvm/test/Transforms/Scalarizer/uadd_with_overflow.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 -; RUN: opt %s -passes='function(scalarizer)' -S | FileCheck %s +; RUN: opt %s -passes="function(scalarizer)" -S | FileCheck %s define <3 x i32> @test_(<3 x i32> %a, <3 x i32> %b) { ; CHECK-LABEL: define <3 x i32> @test_( diff --git a/llvm/test/Transforms/Scalarizer/umul_with_overflow.ll b/llvm/test/Transforms/Scalarizer/umul_with_overflow.ll index 30f0485644b16..ac1ca113bc4bd 100644 --- a/llvm/test/Transforms/Scalarizer/umul_with_overflow.ll +++ b/llvm/test/Transforms/Scalarizer/umul_with_overflow.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 -; RUN: opt %s -passes='function(scalarizer)' -S | FileCheck %s +; RUN: opt %s -passes="function(scalarizer)" -S | FileCheck %s define <3 x i32> @test_(<3 x i32> %a, <3 x i32> %b) { ; CHECK-LABEL: define <3 x i32> @test_( diff --git a/llvm/test/Transforms/Scalarizer/usub_with_overflow.ll b/llvm/test/Transforms/Scalarizer/usub_with_overflow.ll index 782903bb760d8..fe1b5305d8680 100644 --- a/llvm/test/Transforms/Scalarizer/usub_with_overflow.ll +++ b/llvm/test/Transforms/Scalarizer/usub_with_overflow.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 -; RUN: opt %s -passes='function(scalarizer)' -S | FileCheck %s +; RUN: opt %s -passes="function(scalarizer)" -S | FileCheck %s define <3 x i32> @test_(<3 x i32> %a, <3 x i32> %b) { ; CHECK-LABEL: define <3 x i32> @test_(