Worries about PC and smartphone demand have pushed down the memory-chip maker’s stock, offsetting an AI lift.