Skip to content

Conversation

@Michael137
Copy link

No description provided.

…#165837)

We were setting these bits inverted. Not sure how this bug actually
manifests, I just noticed when working on
llvm#165707. I suspect these types
just aren't very frequently used.

(cherry picked from commit e3299ab)
…PointType (llvm#165707)

Similar motivation to llvm#165702.
It was unused in all callsites and inconsistent with other APIs like
`IsIntegerType` (which doesn't take a `count` parameter).

If we ever need a "how many elements does this type represent", we can
implement one with a new TypeSystem API that does exactly that.

Some callsites checked for `count == 1` previously, but I suspect what
they intended to do is check for whether it's a vector type or complex
type, before reading the FP register. I'm somewhat confident that's the
case because the `TypeSystemClang::GetTypeInfo` currently incorrectly
sets the integer and floating point bits for complex and vector types
(will fix separately). But some architectures might choose to pass
single-element vectors in scalar registers. I should probably changes
these to check the vector element size.

All the `count == 2 && is_complex` were redundant because `count == 2`
iff `is_complex == true`. So I just removed the count check there.

(cherry picked from commit b81a992)
@Michael137
Copy link
Author

@swift-ci test

@Michael137
Copy link
Author

@swift-ci test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants