[Hexagon] Reapply 238772 OSABI was not correctly set, added empty_elf test to make...
[oota-llvm.git] / test / CodeGen / R600 / simplify-demanded-bits-build-pair.ll
index e02350cc23f7f6ac51dfe771e54934dfeab66418..dffee70b6b02fd5beda1861e1bb164e3fb7f0df7 100644 (file)
@@ -1,5 +1,6 @@
 ; XFAIL: *
 ; RUN: llc -verify-machineinstrs -march=amdgcn -mcpu=SI -mattr=-promote-alloca < %s | FileCheck -check-prefix=SI %s
+; RUN: llc -verify-machineinstrs -march=amdgcn -mcpu=tonga -mattr=-promote-alloca < %s | FileCheck -check-prefix=SI %s
 
 ; 64-bit select was originally lowered with a build_pair, and this
 ; could be simplified to 1 cndmask instead of 2, but that broken when
@@ -21,16 +22,16 @@ define void @trunc_select_i64(i32 addrspace(1)* %out, i64 %a, i64 %b, i32 %c) {
 define void @trunc_load_alloca_i64(i64 addrspace(1)* %out, i32 %a, i32 %b) {
   %idx = add i32 %a, %b
   %alloca = alloca i64, i32 4
-  %gep0 = getelementptr i64* %alloca, i64 0
-  %gep1 = getelementptr i64* %alloca, i64 1
-  %gep2 = getelementptr i64* %alloca, i64 2
-  %gep3 = getelementptr i64* %alloca, i64 3
+  %gep0 = getelementptr i64, i64* %alloca, i64 0
+  %gep1 = getelementptr i64, i64* %alloca, i64 1
+  %gep2 = getelementptr i64, i64* %alloca, i64 2
+  %gep3 = getelementptr i64, i64* %alloca, i64 3
   store i64 24, i64* %gep0, align 8
   store i64 9334, i64* %gep1, align 8
   store i64 3935, i64* %gep2, align 8
   store i64 9342, i64* %gep3, align 8
-  %gep = getelementptr i64* %alloca, i32 %idx
-  %load = load i64* %gep, align 8
+  %gep = getelementptr i64, i64* %alloca, i32 %idx
+  %load = load i64, i64* %gep, align 8
   %mask = and i64 %load, 4294967296
   %add = add i64 %mask, -1
   store i64 %add, i64 addrspace(1)* %out, align 4