All of lore.kernel.org
 help / color / mirror / Atom feed
* sparse-llvm the LLVM IR for select instruction fails due to different types
@ 2017-03-14 16:07 Dibyendu Majumdar
  2017-03-19  0:21 ` Luc Van Oostenryck
  0 siblings, 1 reply; 4+ messages in thread
From: Dibyendu Majumdar @ 2017-03-14 16:07 UTC (permalink / raw)
  To: Linux-Sparse

Hi,

LLVM complains when the operands of a select are not the same type. I
think it is okay to cast one of the operands to the type of the other
- on the basis that subsequent operations will cast things anyway.

Regards
Dibyendu

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: sparse-llvm the LLVM IR for select instruction fails due to different types
  2017-03-14 16:07 sparse-llvm the LLVM IR for select instruction fails due to different types Dibyendu Majumdar
@ 2017-03-19  0:21 ` Luc Van Oostenryck
  2017-03-19 13:04   ` Dibyendu Majumdar
  0 siblings, 1 reply; 4+ messages in thread
From: Luc Van Oostenryck @ 2017-03-19  0:21 UTC (permalink / raw)
  To: Dibyendu Majumdar; +Cc: Linux-Sparse

On Tue, Mar 14, 2017 at 04:07:40PM +0000, Dibyendu Majumdar wrote:
> Hi,
> 
> LLVM complains when the operands of a select are not the same type. I
> think it is okay to cast one of the operands to the type of the other
> - on the basis that subsequent operations will cast things anyway.

Submit a test case, please.

-- Luc 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: sparse-llvm the LLVM IR for select instruction fails due to different types
  2017-03-19  0:21 ` Luc Van Oostenryck
@ 2017-03-19 13:04   ` Dibyendu Majumdar
  2017-03-19 15:18     ` Luc Van Oostenryck
  0 siblings, 1 reply; 4+ messages in thread
From: Dibyendu Majumdar @ 2017-03-19 13:04 UTC (permalink / raw)
  To: Luc Van Oostenryck; +Cc: Linux-Sparse

On 19 March 2017 at 00:21, Luc Van Oostenryck
<luc.vanoostenryck@gmail.com> wrote:
> On Tue, Mar 14, 2017 at 04:07:40PM +0000, Dibyendu Majumdar wrote:
>> LLVM complains when the operands of a select are not the same type. I
>> think it is okay to cast one of the operands to the type of the other
>> - on the basis that subsequent operations will cast things anyway.
>
> Submit a test case, please.
>

typedef union GCObject GCObject;
typedef union {
 GCObject *gc;
 void *p;
 int b;
} Value;
typedef struct lua_TValue {
 Value value;
 int tt;
} TValue;
typedef struct CClosure {
 GCObject *next;
 TValue upvalue[1];
} CClosure;
typedef struct LClosure {
 GCObject *next;
 GCObject *gclist;
} LClosure;
typedef union Closure {
 CClosure c;
 LClosure l;
} Closure;
static TValue luaO_nilobject_;
TValue *select(Closure *closure, int op)
{
 return op == 1 ? &closure->c.upvalue[0] : (TValue *) &luaO_nilobject_;
}

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: sparse-llvm the LLVM IR for select instruction fails due to different types
  2017-03-19 13:04   ` Dibyendu Majumdar
@ 2017-03-19 15:18     ` Luc Van Oostenryck
  0 siblings, 0 replies; 4+ messages in thread
From: Luc Van Oostenryck @ 2017-03-19 15:18 UTC (permalink / raw)
  To: Dibyendu Majumdar; +Cc: Linux-Sparse

On Sun, Mar 19, 2017 at 01:04:30PM +0000, Dibyendu Majumdar wrote:
> On 19 March 2017 at 00:21, Luc Van Oostenryck
> <luc.vanoostenryck@gmail.com> wrote:
> > On Tue, Mar 14, 2017 at 04:07:40PM +0000, Dibyendu Majumdar wrote:
> >> LLVM complains when the operands of a select are not the same type. I
> >> think it is okay to cast one of the operands to the type of the other
> >> - on the basis that subsequent operations will cast things anyway.
> >
> > Submit a test case, please.
> >

I was thinking to something for the test suite. 
Anyway, this is fixed in the llvm-fixes-v3 serie I submitted yesterday.

-- Luc

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-03-19 15:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-14 16:07 sparse-llvm the LLVM IR for select instruction fails due to different types Dibyendu Majumdar
2017-03-19  0:21 ` Luc Van Oostenryck
2017-03-19 13:04   ` Dibyendu Majumdar
2017-03-19 15:18     ` Luc Van Oostenryck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.