[LLVMdev] floating point immediate problem

Villmow, Micah Micah.Villmow at amd.com
Mon Mar 19 08:36:38 PDT 2012


(f32 imm:$val))]>; <-- this needs to be fpimm, 'imm' is an integer immediate.

> -----Original Message-----
> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu]
> On Behalf Of Heikki Kultala
> Sent: Monday, March 19, 2012 7:41 AM
> To: LLVM Dev
> Subject: [LLVMdev] floating point immediate problem
> 
> I tried to generate pattern for instruction which transports floating
> point immediate to a floating point register.
> 
> def MOVF32fk : InstTCE<(outs F32Regs:$dst), (ins f32imm:$val),
> 	           "$val -> $dst;",
>                     [(set F32Regs:$dst, (f32 imm:$val))]>;
> 
> This causes an type contradiction:
> 
> /home/hkultala26/src/devel/tce/src/applibs/LLVMBackend/plugin//TCEInstr
> Info.td:109:1:
> error: In MOVF32fk: Type inference contradiction found, 'f32' needs to
> be integer
> def MOVF32fk : InstTCE<(outs F32Regs:$dst), (ins f32imm:$val),
> 
> 
> 
> why? Why does llvm assume floating point immediate needs to be integer?
> 
> 
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev






More information about the llvm-dev mailing list