Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

[AArch64] Suspect code near ICE on memset call. #20146

Open Quuxplusone opened 10 years ago

Quuxplusone commented 10 years ago
Bugzilla Link PR20147
Status REOPENED
Importance P normal
Reported by Chad Rosier (mcrosier@codeaurora.org)
Reported on 2014-06-27 16:11:17 -0700
Last modified on 2014-06-28 10:24:19 -0700
Version trunk
Hardware PC Linux
CC apazos@codeaurora.org, Hao.Liu@arm.com, james@jamesmolloy.co.uk, llvm-bugs@lists.llvm.org, mcrosier@codeaurora.org, t.p.northover@gmail.com
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
In r211960, I fixed an ICE in getMemsetValue.

The segment of code just below the fix looks suspect as well, but I was unable
to generate a test case in my quick attempt.

Specifically, line 3638 seems to assume the VT of a vector element is either
f32 or f64.

3636    else if (VT.isVector()) {
3637    unsigned NumElts = VT.getVectorNumElements();
3638    MVT EltVT = (VT.getVectorElementType() == MVT::f32) ? MVT::i32 : MVT::i64;
3639    return DAG.getNode(ISD::BITCAST, dl, VT,
3640    DAG.getConstant(0, EVT::getVectorVT(*DAG.getContext(),
3641    EltVT, NumElts)));
3642    } else

Hoping someone wouldn't mind taking a look.
Quuxplusone commented 10 years ago

The "isInteger" check above captures vectors of integers too.

Quuxplusone commented 10 years ago

Actually, I suppose vNf16 could exist.

Quuxplusone commented 10 years ago
(In reply to comment #2)
> Actually, I suppose vNf16 could exist.

Perhaps, we should just add an assertion?