llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.1k stars 11.6k forks source link

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

Open llvmbot opened 10 years ago

llvmbot commented 10 years ago
Bugzilla Link 20147
Version trunk
OS Linux
Reporter LLVM Bugzilla Contributor
CC @jmolloy,@TNorthover

Extended Description

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.

llvmbot commented 10 years ago

Actually, I suppose vNf16 could exist.

Perhaps, we should just add an assertion?

TNorthover commented 10 years ago

Actually, I suppose vNf16 could exist.

TNorthover commented 10 years ago

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