Skip to content

Commit 77440a9

Browse files
committed
use ptr
1 parent e687f1f commit 77440a9

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

llvm/unittests/Analysis/IRSimilarityIdentifierTest.cpp

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -737,10 +737,10 @@ TEST(IRInstructionMapper, StoreDifferentAtomic) {
737737
// different unsigned integers.
738738
TEST(IRInstructionMapper, AtomicRMWDifferentType) {
739739
StringRef ModuleString = R"(
740-
define i32 @f(i32* %a, i64* %b) {
740+
define i32 @f(ptr %a, ptr %b) {
741741
bb0:
742-
%1 = atomicrmw add i32* %a, i32 1 acquire
743-
%2 = atomicrmw add i64* %b, i64 1 acquire
742+
%1 = atomicrmw add ptr %a, i32 1 acquire
743+
%2 = atomicrmw add ptr %b, i64 1 acquire
744744
ret i32 0
745745
})";
746746
LLVMContext Context;
@@ -763,10 +763,10 @@ TEST(IRInstructionMapper, AtomicRMWDifferentType) {
763763
// unsigned integers.
764764
TEST(IRInstructionMapper, AtomicRMWDifferentAlign) {
765765
StringRef ModuleString = R"(
766-
define i32 @f(i32* %a, i32* %b) {
766+
define i32 @f(ptr %a, ptr %b) {
767767
bb0:
768-
%1 = atomicrmw add i32* %a, i32 1 acquire, align 4
769-
%2 = atomicrmw add i32* %b, i32 1 acquire, align 8
768+
%1 = atomicrmw add ptr %a, i32 1 acquire, align 4
769+
%2 = atomicrmw add ptr %b, i32 1 acquire, align 8
770770
ret i32 0
771771
})";
772772
LLVMContext Context;
@@ -789,10 +789,10 @@ TEST(IRInstructionMapper, AtomicRMWDifferentAlign) {
789789
// different unsigned integers.
790790
TEST(IRInstructionMapper, AtomicRMWDifferentVolatile) {
791791
StringRef ModuleString = R"(
792-
define i32 @f(i32* %a, i32* %b) {
792+
define i32 @f(ptr %a, ptr %b) {
793793
bb0:
794-
%1 = atomicrmw volatile add i32* %a, i32 1 acquire
795-
%2 = atomicrmw add i32* %b, i32 1 acquire
794+
%1 = atomicrmw volatile add ptr %a, i32 1 acquire
795+
%2 = atomicrmw add ptr %b, i32 1 acquire
796796
ret i32 0
797797
})";
798798
LLVMContext Context;
@@ -815,10 +815,10 @@ TEST(IRInstructionMapper, AtomicRMWDifferentVolatile) {
815815
// different unsigned integers.
816816
TEST(IRInstructionMapper, AtomicCmpXchgDifferentType) {
817817
StringRef ModuleString = R"(
818-
define i32 @f(i32* %a, i64* %b) {
818+
define i32 @f(ptr %a, ptr %b) {
819819
bb0:
820-
%1 = cmpxchg i32* %a, i32 0, i32 1 monotonic monotonic
821-
%2 = cmpxchg i64* %b, i64 0, i64 1 monotonic monotonic
820+
%1 = cmpxchg ptr %a, i32 0, i32 1 monotonic monotonic
821+
%2 = cmpxchg ptr %b, i64 0, i64 1 monotonic monotonic
822822
ret i32 0
823823
})";
824824
LLVMContext Context;
@@ -841,10 +841,10 @@ TEST(IRInstructionMapper, AtomicCmpXchgDifferentType) {
841841
// unsigned integers.
842842
TEST(IRInstructionMapper, AtomicCmpXchgDifferentAlign) {
843843
StringRef ModuleString = R"(
844-
define i32 @f(i32* %a, i32* %b) {
844+
define i32 @f(ptr %a, ptr %b) {
845845
bb0:
846-
%1 = cmpxchg i32* %a, i32 0, i32 1 monotonic monotonic, align 4
847-
%2 = cmpxchg i32* %b, i32 0, i32 1 monotonic monotonic, align 8
846+
%1 = cmpxchg ptr %a, i32 0, i32 1 monotonic monotonic, align 4
847+
%2 = cmpxchg ptr %b, i32 0, i32 1 monotonic monotonic, align 8
848848
ret i32 0
849849
})";
850850
LLVMContext Context;
@@ -867,10 +867,10 @@ TEST(IRInstructionMapper, AtomicCmpXchgDifferentAlign) {
867867
// different unsigned integers.
868868
TEST(IRInstructionMapper, AtomicCmpXchgDifferentVolatile) {
869869
StringRef ModuleString = R"(
870-
define i32 @f(i32* %a, i32* %b) {
870+
define i32 @f(ptr %a, ptr %b) {
871871
bb0:
872-
%1 = cmpxchg volatile i32* %a, i32 0, i32 1 monotonic monotonic
873-
%2 = cmpxchg i32* %b, i32 0, i32 1 monotonic monotonic
872+
%1 = cmpxchg volatile ptr %a, i32 0, i32 1 monotonic monotonic
873+
%2 = cmpxchg ptr %b, i32 0, i32 1 monotonic monotonic
874874
ret i32 0
875875
})";
876876
LLVMContext Context;

0 commit comments

Comments
 (0)