load null is undefined behavior, this should fold
authorChris Lattner <sabre@nondot.org>
Thu, 23 Sep 2004 15:45:20 +0000 (15:45 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 23 Sep 2004 15:45:20 +0000 (15:45 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16498 91177308-0d34-0410-b5e6-96231b3b80d8

test/Transforms/InstCombine/select.ll

index fe89d93a664732701a0355206b7cdc34109699bd..0be572577cb6d9600b4464d44ee8cb647284d734 100644 (file)
@@ -136,3 +136,9 @@ int %test15d(int %X) {       ;; Alternate code sequence for (X & 16) ? 16 : 0
         %t3 = select bool %t2, int 16, int 0 ;; X & 16
         ret int %t3
 }
+
+int %test16(bool %C, int* %P) {
+       %P2 = select bool %C, int* %P, int* null
+       %V = load int* %P2
+       ret int %V
+}