[llvm-commits] [llvm] r129909 - in /llvm/trunk: lib/Target/PTX/PTXMachineFunctionInfo.h test/CodeGen/PTX/parameter-order.ll
Che-Liang Chiou
clchiou at gmail.com
Thu Apr 21 03:56:58 PDT 2011
Author: clchiou
Date: Thu Apr 21 05:56:58 2011
New Revision: 129909
URL: http://llvm.org/viewvc/llvm-project?rev=129909&view=rev
Log:
ptx: fix parameter ordering
This patch depends on the prior fix r129908 that changes to use std::find,
rather than std::binary_search, on unordered array.
Patch by Dan Bailey
Modified:
llvm/trunk/lib/Target/PTX/PTXMachineFunctionInfo.h
llvm/trunk/test/CodeGen/PTX/parameter-order.ll
Modified: llvm/trunk/lib/Target/PTX/PTXMachineFunctionInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PTX/PTXMachineFunctionInfo.h?rev=129909&r1=129908&r2=129909&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PTX/PTXMachineFunctionInfo.h (original)
+++ llvm/trunk/lib/Target/PTX/PTXMachineFunctionInfo.h Thu Apr 21 05:56:58 2011
@@ -42,12 +42,9 @@
void setRetReg(unsigned reg) { reg_ret = reg; }
void doneAddArg(void) {
- std::sort(reg_arg.begin(), reg_arg.end());
_isDoneAddArg = true;
}
- void doneAddLocalVar(void) {
- std::sort(reg_local_var.begin(), reg_local_var.end());
- }
+ void doneAddLocalVar(void) {}
bool isDoneAddArg(void) { return _isDoneAddArg; }
Modified: llvm/trunk/test/CodeGen/PTX/parameter-order.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PTX/parameter-order.ll?rev=129909&r1=129908&r2=129909&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PTX/parameter-order.ll (original)
+++ llvm/trunk/test/CodeGen/PTX/parameter-order.ll Thu Apr 21 05:56:58 2011
@@ -1,8 +1,8 @@
; RUN: llc < %s -march=ptx32 | FileCheck %s
-; CHECK: .func (.reg .u32 r0) test_parameter_order (.reg .u32 r1, .reg .u32 r2)
-define ptx_device i32 @test_parameter_order(i32 %x, i32 %y) {
+; CHECK: .func (.reg .u32 r0) test_parameter_order (.reg .f32 f1, .reg .u32 r1, .reg .u32 r2, .reg .f32 f2)
+define ptx_device i32 @test_parameter_order(float %a, i32 %b, i32 %c, float %d) {
; CHECK: sub.u32 r0, r1, r2
- %z = sub i32 %x, %y
- ret i32 %z
+ %result = sub i32 %b, %c
+ ret i32 %result
}
More information about the llvm-commits
mailing list