[LLVMbugs] [Bug 3994] New: tablegen intrinsic forcing wrong register type on final parameter
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Wed Apr 15 13:46:08 PDT 2009
http://llvm.org/bugs/show_bug.cgi?id=3994
Summary: tablegen intrinsic forcing wrong register type on final
parameter
Product: tools
Version: 2.5
Platform: PC
OS/Version: Windows NT
Status: NEW
Severity: normal
Priority: P2
Component: TableGen
AssignedTo: unassignedbugs at nondot.org
ReportedBy: micah.villmow at amd.com
CC: llvmbugs at cs.uiuc.edu
Created an attachment (id=2828)
--> (http://llvm.org/bugs/attachment.cgi?id=2828)
td test case that shows this problem
This is the "Tablegen question" thread.
This is what is generated in intrinsic.gen:
case Intrinsic::opencl_math_fdistance: //
llvm.opencl.math.fdistance
ResultTy = Type::FloatTy;
ArgTys.push_back(Tys[0]);
ArgTys.push_back(Tys[0]);
break;
This is the intrinsic definition:
def int_opencl_math_fdistance_fast : Intrinsic<[llvm_float_ty],
[llvm_anyfloat_ty, LLVMMatchType<0>]>;
The problem comes when I try to use the intrinsic. It gives me the following
error:
GPRV2F32:f32:$src1 MACRO_DISTANCE_FAST_v2f32: (set GPRF32:f32:$dst,
(intrinsic_w_chain:f32 84:iPTR, GPRV2F32:v2f32:$src0,
GPRV2F32:f32:$src1))
TableGen.exe: In MACRO_DISTANCE_FAST_v2f32: Type inference contradiction found
in node!
I'm using the following test td file.
This is generated with putting it in include and running the command
Tablegen.exe -dag-isel -I. test.td
The pattern in question is:
ILFormat<(outs Dst:$dst), (ins Src:$src0, Src:$src1),
",($dst),($src0, $src1)",
[(set Dst:$dst, (OpNode Src:$src0, Src:$src1))]
As the intrinsic specifies, the two source register classes should be the same,
however, Tablegen is somehow interpreting that it should be
f32 instead of v2f32.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list