[llvm] 4ae1740 - [JumpThreading] Make test more robust (NFC)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 20 04:06:02 PDT 2020


Author: Nikita Popov
Date: 2020-06-20T13:05:42+02:00
New Revision: 4ae1740b871ebb63ca59e2fd3d314b6ebea7102e

URL: https://github.com/llvm/llvm-project/commit/4ae1740b871ebb63ca59e2fd3d314b6ebea7102e
DIFF: https://github.com/llvm/llvm-project/commit/4ae1740b871ebb63ca59e2fd3d314b6ebea7102e.diff

LOG: [JumpThreading] Make test more robust (NFC)

Optimizing away this comparison is not the point of this test,
so make sure it cannot be optimized away.

Added: 
    

Modified: 
    llvm/test/Transforms/JumpThreading/combine-metadata.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Transforms/JumpThreading/combine-metadata.ll b/llvm/test/Transforms/JumpThreading/combine-metadata.ll
index 39ac9a026766..4ed6cfecc59a 100644
--- a/llvm/test/Transforms/JumpThreading/combine-metadata.ll
+++ b/llvm/test/Transforms/JumpThreading/combine-metadata.ll
@@ -108,7 +108,7 @@ d2:
 d3:
   %y = load i32*, i32** %ptr
   store i32 1, i32* %y
-  %c2 = icmp eq i32* %y, null
+  %c2 = icmp eq i32* %y, @p
   br i1 %c2, label %ret1, label %ret2
 
 ret1:
@@ -118,5 +118,6 @@ ret2:
   ret void
 }
 
+ at p = external global i32
 
 !0 = !{}


        


More information about the llvm-commits mailing list