[Hexagon] Reapply 238772 OSABI was not correctly set, added empty_elf test to make...
[oota-llvm.git] / test / CodeGen / R600 / loop-idiom.ll
index 847a34bc4cda7fb9d9e04270c566b1800e4106cb..810b34fed865578e68360ddae02ef026e27da1da 100644 (file)
@@ -1,5 +1,6 @@
 ; RUN: opt -basicaa -loop-idiom -S < %s -march=r600 -mcpu=redwood | FileCheck --check-prefix=R600 --check-prefix=FUNC %s
 ; RUN: opt -basicaa -loop-idiom -S < %s -march=amdgcn -mcpu=SI -verify-machineinstrs| FileCheck --check-prefix=SI --check-prefix=FUNC %s
+; RUN: opt -basicaa -loop-idiom -S < %s -march=amdgcn -mcpu=tonga -verify-machineinstrs| FileCheck --check-prefix=SI --check-prefix=FUNC %s
 
 target datalayout = "e-p:32:32-p1:64:64-p2:64:64-p3:32:32-p4:32:32-p5:64:64-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64"
 target triple = "r600--"
@@ -19,9 +20,9 @@ entry:
 
 for.body:
   %0 = phi i32 [0, %entry], [%4, %for.body]
-  %1 = getelementptr i8 addrspace(3)* %in, i32 %0
-  %2 = getelementptr i8* %dest, i32 %0
-  %3 = load i8 addrspace(3)* %1
+  %1 = getelementptr i8, i8 addrspace(3)* %in, i32 %0
+  %2 = getelementptr i8, i8* %dest, i32 %0
+  %3 = load i8, i8 addrspace(3)* %1
   store i8 %3, i8* %2
   %4 = add i32 %0, 1
   %5 = icmp eq i32 %4, %size
@@ -43,7 +44,7 @@ entry:
 
 for.body:
   %0 = phi i32 [0, %entry], [%2, %for.body]
-  %1 = getelementptr i8* %dest, i32 %0
+  %1 = getelementptr i8, i8* %dest, i32 %0
   store i8 0, i8* %1
   %2 = add i32 %0, 1
   %3 = icmp eq i32 %2, %size