aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVikram S. Adve <vadve@cs.uiuc.edu>2002-09-20 00:57:37 +0000
committerVikram S. Adve <vadve@cs.uiuc.edu>2002-09-20 00:57:37 +0000
commitba3b3e86d1ffdc8aecf8e4535af10d84f0d6d5f9 (patch)
treeb5b9f357e808e451effca979491c7f1b599a5f08
parent46d6a1aeb549a2e4ccd982a1a2cefda541d79c52 (diff)
Fix to avoid addition on pointers, which is no longer legal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3850 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/CodeGen/Generic/select.ll8
-rw-r--r--test/LLC/select.ll8
2 files changed, 10 insertions, 6 deletions
diff --git a/test/CodeGen/Generic/select.ll b/test/CodeGen/Generic/select.ll
index 4a34d58785..222fd36954 100644
--- a/test/CodeGen/Generic/select.ll
+++ b/test/CodeGen/Generic/select.ll
@@ -165,9 +165,11 @@ begin
bb2: ;;<label>
%reg114 = shl int %N, ubyte 2 ;;
- %cast115 = cast int %reg114 to int* ;; reg114 will be propagated
- %reg116 = add int* %A, %cast115 ;;
- %reg118 = load int* %reg116 ;;
+ %cast115 = cast int %reg114 to long ;; reg114 will be propagated
+ %cast116 = cast int* %A to long ;; %A will be propagated
+ %reg116 = add long %cast116, %cast115 ;;
+ %castPtr = cast long %reg116 to int* ;; %A will be propagated
+ %reg118 = load int* %castPtr ;;
%cast117 = cast int %reg118 to long ;; reg118 will be copied 'cos
%reg159 = add long 1234567, %cast117 ;; cast117 has 2 uses, here
%reg160 = add long 7654321, %cast117 ;; and here.
diff --git a/test/LLC/select.ll b/test/LLC/select.ll
index 4a34d58785..222fd36954 100644
--- a/test/LLC/select.ll
+++ b/test/LLC/select.ll
@@ -165,9 +165,11 @@ begin
bb2: ;;<label>
%reg114 = shl int %N, ubyte 2 ;;
- %cast115 = cast int %reg114 to int* ;; reg114 will be propagated
- %reg116 = add int* %A, %cast115 ;;
- %reg118 = load int* %reg116 ;;
+ %cast115 = cast int %reg114 to long ;; reg114 will be propagated
+ %cast116 = cast int* %A to long ;; %A will be propagated
+ %reg116 = add long %cast116, %cast115 ;;
+ %castPtr = cast long %reg116 to int* ;; %A will be propagated
+ %reg118 = load int* %castPtr ;;
%cast117 = cast int %reg118 to long ;; reg118 will be copied 'cos
%reg159 = add long 1234567, %cast117 ;; cast117 has 2 uses, here
%reg160 = add long 7654321, %cast117 ;; and here.